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

Author Topic: SFML + SFGUI = multiple definition of `sf::Image::~Image()'  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

Sumzary

  • Guest
SFML + SFGUI = multiple definition of `sf::Image::~Image()'
« on: August 19, 2014, 10:39:07 pm »
I downloaded the freshest gits of both SFML and SFGUI, compiled them just fine, then tried to compile a program that uses both, got this:

D:/Pro/Dev/lib/libsfml-graphics-s-d.a(Image.cpp.obj): In function `ZN2sf5ImageD2Ev':
D:/Pro/Libraries/SFML-source/src/SFML/Graphics/Image.cpp:53: multiple definition of `sf::Image::~Image()'
D:/Pro/Dev/lib/sfgui-s-d.a(Image.cpp.obj):D:/Pro/Libraries/SFML-install-debug/include/SFML/Graphics/Image.hpp:46: first defined here
collect2.exe: error: ld returned 1 exit status

Any ideas?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML + SFGUI = multiple definition of `sf::Image::~Image()'
« Reply #1 on: August 19, 2014, 11:17:13 pm »
Can you upload your libsfml-graphics-s-d.a and sfgui-s-d.a for me to download and check?
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Sumzary

  • Guest

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFML + SFGUI = multiple definition of `sf::Image::~Image()'
« Reply #3 on: August 20, 2014, 10:46:58 am »
Well... I just checked them, and sf::Image::~Image() is undefined inside libsfgui-s-d.a like it should be.

You must be doing something wrong during linking. Can you post your build log during a full rebuild for us to see? It would help.

And by the way... you uploaded libsfgui-s-d.a whereas your linker error refers to sfgui-s-d.a, in case you haven't realized.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Sumzary

  • Guest
Re: SFML + SFGUI = multiple definition of `sf::Image::~Image()'
« Reply #4 on: August 20, 2014, 11:34:56 am »
Yep, had an old "sfgui-s-d.a" and my project was linking to that... These things are so simple sometimes it hurts :|

Thanks a bunch for sending me in the right direction!