Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Failing To Run  (Read 918 times)

0 Members and 1 Guest are viewing this topic.

gr0g

  • Newbie
  • *
  • Posts: 1
    • View Profile
Failing To Run
« on: February 20, 2016, 04:14:43 pm »
Hi, I am running Manajaro 64 bit, getting started with sfml.

I'm using the precompiled SDK to compile the linux tutorial code from this page
http://www.sfml-dev.org/tutorials/2.3/start-linux.php

Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

Anyway, compiling works fine I think, at least there are no errors and it spits out a binary, but when I go to run it using
with absolute path:
export LD_LIBRARY_PATH=/home/null/Documents/sfml/SFML-2.3.2/lib && ./sfml-app
or with relative path:
export LD_LIBRARY_PATH=../../sfml/SFML-2.3.2/lib && ./sfml-app

I get a massive list of errors

Code: [Select]
*** Error in `./sfml-app': free(): invalid pointer: 0x00000000010d26d8 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7f3bb2d79055]
/usr/lib/libc.so.6(+0x779a6)[0x7f3bb2d7e9a6]
/usr/lib/libc.so.6(+0x7818e)[0x7f3bb2d7f18e]
./sfml-app[0x401552]
./sfml-app[0x401521]
./sfml-app[0x4014b0]
./sfml-app[0x401426]
./sfml-app[0x4013a5]
./sfml-app(_ZN2sf6StringD1Ev+0x18)[0x40136c]
./sfml-app[0x401162]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f3bb2d27610]
./sfml-app[0x400fe9]
======= Memory map: ========

So, anyone know what's wrong?  ???
« Last Edit: February 20, 2016, 04:36:46 pm by gr0g »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Failing To Run
« Reply #1 on: February 20, 2016, 10:53:35 pm »
I'm not sure, but I'd guess that building SFML from scratch on your own, will most likely solve the issue.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/