1

So this morning I upgraded my MinGW compiler to 4.7.1 (from 4.4.1, I believe), and have since been trying to get old projects building and running properly again. My efforts have met a wall, however, in that now, whenever I try to compile projects that use the SFML library, I get the following error:

The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll

Now I know this problem has been discussed before, but unfortunately the proposed hacky-fix of defining void *__gxx_personality_v0; hasn't done me any good, and I've checked whether I am accidentally using GCC, but CodeBlocks has the C++ compiler set to MinGW's G++, not GCC (under Settings->Compiler->Toolchain Executables->Program Files, I have mingw32-g++.exe as the C++ compiler). So that doesn't seem to be the problem.

The program I am trying to compile, in its entirety, is an example from the SFML website:

#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;
}

Right now this issue occurs with every single SFML project I try to run, but small non-SFML projects seem to run fine.

What could I try in order to fix this?

Community
  • 1
  • 1
GarrickW
  • 2,181
  • 5
  • 31
  • 38
  • I just post an answer, but in order to really find the problem, it would be interesting to see your project directory structure and the files each dir contains. – Emile Bergeron Oct 02 '13 at 17:37

1 Answers1

0

It would need some more information, but let me try to guess here. Would it be possible that somehow, you're still linking the old (or another version) of the libstdc++-6.dll file?

Are the dll beside your EXE? Have you tried taking the version provided by the compiler you're using? In that case MinGW in which the libstdc++-6.dll file is under the bin directory.

Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129
  • 1
    I actually managed to solve the problem by essentially uninstalling my compiler/IDE/libraries and reinstalling them. I still don't know what exactly happened or why it wasn't working. The DLLs were in fact next alongside the EXE as they should be; I think the problem might have had something to do with a confusion between the DW2 and SJLJ versions of SFML and MinGW, even though I thought I had compatible versions thereof. – GarrickW Oct 03 '13 at 03:52