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

Author Topic: Undefined reference to sf::Thread::* when using self compiled library  (Read 2950 times)

0 Members and 1 Guest are viewing this topic.

Ethon

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hi,
I always get error messages like this when using sf::Music with self-compiled SFML2-RC. (It works when using precompiled libraries, but that is no option)

../Libs/SFML/lib/libsfml-audio.a(SoundStream.cpp.o)||In function `sf::SoundStream::play()':|
/home/ferler/Projects/tee2/Libs/SFML/src/SFML/Audio/SoundStream.cpp|105|undefined reference to `sf::Thread::launch()'|
../Libs/SFML/lib/libsfml-audio.a(SoundStream.cpp.o)||In function `sf::SoundStream::~SoundStream()':|
/home/ferler/Projects/tee2/Libs/SFML/src/SFML/Audio/SoundStream.cpp|56|undefined reference to `sf::Thread::~Thread()'|
/home/ferler/Projects/tee2/Libs/SFML/src/SFML/Audio/SoundStream.cpp|56|undefined reference to `sf::Thread::~Thread()'|
../Libs/SFML/lib/libsfml-audio.a(SoundStream.cpp.o)||In function `sf::SoundStream::setPlayingOffset(sf::Time)':|
/home/ferler/Projects/tee2/Libs/SFML/src/SFML/Audio/SoundStream.cpp|164|undefined reference to `sf::Thread::launch()'|
../Libs/SFML/lib/libsfml-audio.a(SoundStream.cpp.o)||In function `sf::SoundStream::stop()':|
/home/ferler/Projects/tee2/Libs/SFML/src/SFML/Audio/SoundStream.cpp|121|undefined reference to `sf::Thread::wait()'|
||=== Build finished: 5 errors, 0 warnings ===|

Of course I link sfml-system. Any guess what could be wrong?

I am building it that way:
cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGLEW_INCLUDE_PATH=../../GLEW/include -DGLEW_LIBRARY=../libGLEW_d.a -DSFML_INSTALL_PKGCONFIG_FILES=OFF

Thanks,
Ethon

Ethon

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Undefined reference to sf::Thread::* when using self compiled library
« Reply #1 on: February 20, 2013, 01:15:46 pm »
Ah, link order ... I didn't find a solution for hours, but 1 minute after posting my question here, the solution comes into my mind ...

Problem solved!