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

Author Topic: Help on making static libs  (Read 2327 times)

0 Members and 1 Guest are viewing this topic.

vehem

  • Newbie
  • *
  • Posts: 7
    • View Profile
Help on making static libs
« on: October 02, 2010, 08:31:20 am »
I'm using Debian amd64 lenny and gcc 4.3.2 and code::block for my IDE.

I build the static library fine but when i link to the static libs I get errors like this.
Code: [Select]

-------------- Build: Release in FirstProj ---------------

Linking console executable: bin/Release/FirstProj
obj/Release/Amplified1/ResourceManager.o: In function `ResourceManager::LoadSound(char const*)':
ResourceManager.cpp:(.text+0xf0a): undefined reference to `pthread_cancel'
ResourceManager.cpp:(.text+0xf37): undefined reference to `pthread_cancel'
obj/Release/Amplified1/ResourceManager.o: In function `ResourceManager::LoadImage(char const*)':
ResourceManager.cpp:(.text+0x1262): undefined reference to `pthread_cancel'
ResourceManager.cpp:(.text+0x128f): undefined reference to `pthread_cancel'
obj/Release/Amplified1/ResourceManager.o: In function `std::tr1::_Hashtable<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*>, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_deallocate_node(std::tr1::__detail::_Hash_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*>, false>*)':
ResourceManager.cpp:(.text._ZNSt3tr110_HashtableISsSt4pairIKSsP12SoundWrapperESaIS5_ESt10_Select1stIS5_ESt8equal_toISsENS_4hashISsEENS_8__detail18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyELb0ELb0ELb1EE18_M_deallocate_nodeEPNSD_10_Hash_nodeIS5_Lb0EEE[std::tr1::_Hashtable<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*>, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_deallocate_node(std::tr1::__detail::_Hash_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*>, false>*)]+0x27): undefined reference to `pthread_cancel'
obj/Release/Amplified1/ResourceManager.o:ResourceManager.cpp:(.text._ZNSt3tr110_HashtableISsSt4pairIKSsP12SoundWrapperESaIS5_ESt10_Select1stIS5_ESt8equal_toISsENS_4hashISsEENS_8__detail18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyELb0ELb0ELb1EE9_M_rehashEm[std::tr1::_Hashtable<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*>, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SoundWrapper*> >, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_rehash(unsigned long)]+0xf9): more undefined references to `pthread_cancel' follow
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-system-s.a(Thread.o): In function `sf::Thread::Wait()':
Thread.cpp:(.text+0x157): undefined reference to `pthread_join'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-system-s.a(Thread.o): In function `sf::Thread::Launch()':
Thread.cpp:(.text+0x1fd): undefined reference to `pthread_create'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(Joystick.o): In function `sf::priv::Joystick::Initialize(unsigned int)':
Joystick.cpp:(.text+0x7ee): undefined reference to `pthread_cancel'
Joystick.cpp:(.text+0x83c): undefined reference to `pthread_cancel'
Joystick.cpp:(.text+0x873): undefined reference to `pthread_cancel'
Joystick.cpp:(.text+0x8ab): undefined reference to `pthread_cancel'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(Joystick.o): In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()':
Joystick.cpp:(.text._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED1Ev[std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf()]+0x47): undefined reference to `pthread_cancel'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(VideoModeSupport.o): In function `sf::priv::VideoModeSupport::GetDesktopVideoMode()':
VideoModeSupport.cpp:(.text+0xc7): undefined reference to `XRRGetScreenInfo'
VideoModeSupport.cpp:(.text+0xdc): undefined reference to `XRRConfigCurrentConfiguration'
VideoModeSupport.cpp:(.text+0xec): undefined reference to `XRRConfigSizes'
VideoModeSupport.cpp:(.text+0x139): undefined reference to `XRRFreeScreenConfigInfo'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(VideoModeSupport.o): In function `sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)':
VideoModeSupport.cpp:(.text+0x1bc): undefined reference to `XRRGetScreenInfo'
VideoModeSupport.cpp:(.text+0x1d7): undefined reference to `XRRConfigSizes'
VideoModeSupport.cpp:(.text+0x2f5): undefined reference to `XRRFreeScreenConfigInfo'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(WindowImplX11.o): In function `sf::priv::WindowImplX11::CleanUp()':
WindowImplX11.cpp:(.text+0xa76): undefined reference to `XRRGetScreenInfo'
WindowImplX11.cpp:(.text+0xa8b): undefined reference to `XRRConfigCurrentConfiguration'
WindowImplX11.cpp:(.text+0xab9): undefined reference to `XRRSetScreenConfig'
WindowImplX11.cpp:(.text+0xac1): undefined reference to `XRRFreeScreenConfigInfo'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-window-s.a(WindowImplX11.o): In function `sf::priv::WindowImplX11::SwitchToFullscreen(sf::VideoMode const&)':
WindowImplX11.cpp:(.text+0x194c): undefined reference to `XRRGetScreenInfo'
WindowImplX11.cpp:(.text+0x1965): undefined reference to `XRRConfigCurrentConfiguration'
WindowImplX11.cpp:(.text+0x197c): undefined reference to `XRRConfigSizes'
WindowImplX11.cpp:(.text+0x19db): undefined reference to `XRRSetScreenConfig'
WindowImplX11.cpp:(.text+0x19f4): undefined reference to `XRRFreeScreenConfigInfo'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(Font.o): In function `sf::Font::LoadFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, sf::Unicode::Text const&)':
Font.cpp:(.text+0x568): undefined reference to `pthread_cancel'
Font.cpp:(.text+0x58d): undefined reference to `pthread_cancel'
Font.cpp:(.text+0x5bf): undefined reference to `pthread_cancel'
Font.cpp:(.text+0x5ef): undefined reference to `pthread_cancel'
Font.cpp:(.text+0x61f): undefined reference to `pthread_cancel'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(Font.o):Font.cpp:(.text+0xa1a): more undefined references to `pthread_cancel' follow
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::CreateBitmapFont(FT_FaceRec_*, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':
FontLoader.cpp:(.text+0xe12): undefined reference to `FT_Set_Pixel_Sizes'
FontLoader.cpp:(.text+0xe71): undefined reference to `FT_Select_Charmap'
FontLoader.cpp:(.text+0xf10): undefined reference to `FT_Load_Char'
FontLoader.cpp:(.text+0xf31): undefined reference to `FT_Get_Glyph'
FontLoader.cpp:(.text+0xf4c): undefined reference to `FT_Glyph_To_Bitmap'
FontLoader.cpp:(.text+0x14a4): undefined reference to `FT_Done_Glyph'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::FontLoader()':
FontLoader.cpp:(.text+0x184e): undefined reference to `FT_Init_FreeType'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::FontLoader()':
FontLoader.cpp:(.text+0x19ee): undefined reference to `FT_Init_FreeType'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::LoadFontFromMemory(char const*, unsigned long, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':
FontLoader.cpp:(.text+0x1b38): undefined reference to `FT_New_Memory_Face'
FontLoader.cpp:(.text+0x1bcf): undefined reference to `FT_Done_Face'
FontLoader.cpp:(.text+0x1c9d): undefined reference to `pthread_cancel'
FontLoader.cpp:(.text+0x1cc8): undefined reference to `pthread_cancel'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::LoadFontFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&, sf::Font&)':
FontLoader.cpp:(.text+0x1d73): undefined reference to `FT_New_Face'
FontLoader.cpp:(.text+0x1e36): undefined reference to `FT_Done_Face'
FontLoader.cpp:(.text+0x1f54): undefined reference to `pthread_cancel'
FontLoader.cpp:(.text+0x1f7f): undefined reference to `pthread_cancel'
/home/vehement/CPP Library/SFML-1.6/lib/libsfml-graphics-s.a(FontLoader.o): In function `sf::priv::FontLoader::~FontLoader()':
FontLoader.cpp:(.text+0xc49): undefined reference to `FT_Done_FreeType'
Process terminated with status 1 (0 minutes, 0 seconds)
50 errors, 0 warnings


I followed the tutorial in http://www.sfml-dev.org/tutorials/1.6/start-linux.php and just changed the STATIC to yes in the make file in the src folder.

 

anything