SFML community forums

Help => General => Topic started by: Knarf0 on December 26, 2015, 09:25:09 pm

Title: Linker undefined references
Post by: Knarf0 on December 26, 2015, 09:25:09 pm
Hello,

I'm trying to compile my project from Linux to Windows and the linker is giving me a few undefined references errors.

Using : SFML 2.3.2 for GCC 4.9.2 MinGW (DW2) - 32-bit
and compiling with i686-w64-mingw32-g++ (GCC) 5.3.1

(click to show/hide)

Thanks for your help
Title: Re: Linker undefined references
Post by: dabbertorres on December 26, 2015, 11:56:16 pm
The SFML version you downloaded is not compatible with the compiler you're using (different versions, 4.x vs 5.x).

For that compiler, you'll need to compile SFML yourself (not difficult at all).
Title: Re: Linker undefined references
Post by: Knarf0 on December 28, 2015, 01:50:01 pm
I've compiled SFML, and I'm able to compile examples such as Pong.

But I can't get the program to run, I'm getting this error : "wine: Call from 0x7bc52989 to unimplemented function libstdc++-6.dll.__cxa_guard_acquire, aborting"

So I guess the libstdc++-6.dll lack some functions the program needs and I can't do nothing about it...
Title: Re: Linker undefined references
Post by: Jesper Juhl on December 28, 2015, 02:07:09 pm
Let me just ask the basic questions to get them out of the way.

Are you using the exact same compiler/linker for your application that you used for SFML?

Are you mixing debug and release builds of SFML and your application (you shouldn't)?

Are you defining SFML_STATIC but linking dynamically? Or not defining it but linking statically?
Title: Re: Linker undefined references
Post by: Knarf0 on December 28, 2015, 04:33:58 pm
I compiled SFML again but this time setting SFML_USE_STATIC_STD_LIBS flag to TRUE, it works fine.