Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compiler error with windows 8 sfml and codeblocks

Tags:

c++

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 sfml-graphics-d-2.dll

btw IDE is Code::Blocks 12.11 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?

like image 638
user3200828 Avatar asked Sep 16 '26 13:09

user3200828


1 Answers

You need to use the correct SFML package. Errors with gxx_personality_v0 usually indicate a runtime library mismatch. If you're really using Code::Blocks 12.11 with the compiler they ship with, then you'll have the TDM 4.7.1 compiler, which uses the SJLJ exception model. Thus the matching compiler from the SFML download page would be GCC 4.7 TDM (SJLJ) - 32 bits.

Keep in mind that there's a newer Code::Blocks version (13.12), which uses a newer version of TDM, but for which SFML doesn't provide binaries/pre-compiled packages, thus you'd have to build SFML yourself. While the TDM compiler is easy to install, I wouldn't recommend it, since it breaks the standard way of using GCC-like compilers. Instead you might want to look at Stephan T. Lavavej's build over at nuwen.net or go with MinGW Builds - for each you'll have to recompile SFML.

like image 94
Lukas Avatar answered Sep 19 '26 07:09

Lukas