SFML community forums

Help => General => Topic started by: Tukimitzu on May 17, 2018, 11:53:43 pm

Title: [SOLVED] Linking error after migrating from SFML 2.4.0 to 2.5.0
Post by: Tukimitzu on May 17, 2018, 11:53:43 pm
EDIT: Solution at the end of this thread.

Hello!

I'm having a linking error that only happens when I try to build on debug mode.

obj\main.o:main.cpp:(.rdata$_ZTV16SFMLRenderWindow[__ZTV16SFMLRenderWindow]+0x1c)||undefined reference to `sf::RenderWindow::activate(bool)'|
obj\main.o:main.cpp:(.rdata$_ZTV16SFMLRenderWindow[__ZTV16SFMLRenderWindow]+0x34)||undefined reference to `non-virtual thunk to sf::RenderWindow::activate(bool)'|

I've built SFML 2.5.0 from scratch, with CMake, with the MinGW g++ compiler version 6.2.0 (i686-posix-dwarf-rev1, Built by MinGW-W64 project).

I'm sure I'm doing something wrong, but I can't find out what. Again, release build works just fine, it only happens on the debug build.

Thanks!
Title: Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
Post by: eXpl0it3r on May 17, 2018, 11:56:04 pm
Did you replace the old library files with the new ones?
Title: Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
Post by: Tukimitzu on May 18, 2018, 12:03:42 am
What I did is I changed the path where it looks for the libs, so it now looks at the proper place, i.e., SFML-2.5.0/lib
Title: Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
Post by: Tukimitzu on May 18, 2018, 12:06:16 am
Ah! Of course! I just needed a clean build of my entire program. It works just fine!

Thanks!