SFML community forums

Help => General => Topic started by: gr0g on February 20, 2016, 04:14:43 pm

Title: Failing To Run
Post by: gr0g 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?  ???
Title: Re: Failing To Run
Post by: eXpl0it3r 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.