Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Linker undefined references  (Read 1983 times)

0 Members and 1 Guest are viewing this topic.

Knarf0

  • Newbie
  • *
  • Posts: 7
    • View Profile
Linker undefined references
« 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

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Linker undefined references
« Reply #1 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).

Knarf0

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Linker undefined references
« Reply #2 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...

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Linker undefined references
« Reply #3 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?

Knarf0

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Linker undefined references
« Reply #4 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.