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

Author Topic: [SOLVED] Linking error after migrating from SFML 2.4.0 to 2.5.0  (Read 2615 times)

0 Members and 1 Guest are viewing this topic.

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
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!
« Last Edit: May 18, 2018, 12:31:31 am by Tukimitzu »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
« Reply #1 on: May 17, 2018, 11:56:04 pm »
Did you replace the old library files with the new ones?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
« Reply #2 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

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
Re: Linking error after migrating from SFML 2.4.0 to 2.5.0
« Reply #3 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!