Problem linking SFML

Hi!

Trying to pick up a 2D library, SFML was my choice.

But, I can't get it to link properly.

When I try to build and run it I get the following error:
the procedure entry point gxx personality v0 could not be located in the dynamic link library libstdc++-6.dll



btw IDE is Code::Blocks and compiler is MinGW(default)

I've extracted the library to c:\SFML-2.0

I've set the compiler search directories for compiler to C:\SFML-2.0\include
and Linker: C:\SFML-2.0\lib

And in the project that I've started I've added in the linker settings-> link libraries:

Debug:
sfml-graphics-d
sfml-window-d
sfml-system-d

Release:
sfml-graphics
sfml-window
sfml-system


I've also copied the dll files from C:\sfml-2.0\bin to the location of the project.


I've tried using the static linking without success.
watched some sfml tutorials and followed them, googled but nothing seems to work for me.
Also reinstalled code::blocks.

Ideas?
I had this problem as well.
1) First delete any duplicate instances of libstdc++-6.dll of you computer except the one in the mingw folder in codeblocks


2) If that doesnt work.
Go on to the mingw website.
Click on download tab thing on the side.
Then click on "Download mingw-get-inst-20120426.exe (662.7 kB)"
Install it wherever.
Then delete the mingw folder from inside codeblocks folder.
Cut and paste the newly downloaded version into the codeblocks folder.

This should work
Hope it helps :)
Progress!!
Now it just instant-crashes when I run it. Guessing code problem.

I've looked over the build options unsuccessful.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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;
}


Or is it something else?
reinstalled eveything, still instant crash upon start... I think I got the linking correct, finding no solution. Any help?
tried recompiling from source, and using nightly builds from here: http://en.sfml-dev.org/forums/index.php?topic=9513.0

still... no solution

recompiling should work, but it's not...
Last edited on
Have you thought about setting up your pc to dual boot windows & linux? Ubuntu is very user friendly and easy to install alongside windows. You could use ubuntu - or any linux to do your programming as it offers much better development tools - even apart from sfml.

You won't have such problems using sfml in linux. personally I think that you should back up your stuff, set up a dual boot system - then install sfml in linux.
Topic archived. No new replies allowed.