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?