MasterOfTheWind |
10-14-2005 11:25 AM |
GNU doesn't seem to recognize libstdc++
Hi!
Just installed debian and got following problem: When trying to compile a simple program that uses some aspects of the std-lib (like vectors, strings and so on), I get following error messages on linking:
Code:
g++ -lm -O3 -ffast-math -Wall -I. main.o utils.o vector.o color.o matrix.o transform.o shape.o sphere.o -o iray
utils.o: In function `__gnu_cxx::__common_pool_base<__gnu_cxx::__pool, true>::_S_initialize()':
utils.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx18__common_pool_baseINS_6__poolELb1EE13_S_initializeEv[__gnu_cxx::__common_pool_base<__gnu_cxx::__pool, true>::_S_initialize()]+0xd2): undefined reference to `__gnu_cxx::__pool<true>::_M_initialize()'
utils.o: In function `__gnu_cxx::__common_pool_base<__gnu_cxx::__pool, true>::_S_initialize_once()':
utils.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx18__common_pool_baseINS_6__poolELb1EE18_S_initialize_onceEv[__gnu_cxx::__common_pool_base<__gnu_cxx::__pool, true>::_S_initialize_once()]+0x101): undefined reference to `__gnu_cxx::__pool<true>::_M_initialize()'
utils.o: In function `__gnu_cxx::__mt_alloc<NumValue, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::allocate(unsigned int, void const*)':
utils.cpp:(.gnu.linkonce.t._ZN9__gnu_cxx10__mt_allocI8NumValueNS_20__common_pool_policyINS_6__poolELb1EEEE8allocateEjPKv[__gnu_cxx::__mt_alloc<NumValue, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::allocate(unsigned int, void const*)]+0x2a1): undefined reference to `__gnu_cxx::__pool<true>::_M_initialize()'
color.o: In function `Color::getString()':
color.cpp:(.text+0x16d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
color.cpp:(.text+0x175): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
color.o: In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)':
color.cpp:(.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x26): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned int, std::allocator<char> const&)'
color.cpp:(.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x73): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
color.cpp:(.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x79): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
color.o: In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)':
color.cpp:(.gnu.linkonce.t._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekoffElSt12_Ios_SeekdirSt13_Ios_Openmode+0x1a9): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::_M_out_cur_move(long)'
color.o: In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)':
color.cpp:(.gnu.linkonce.t._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode+0x128): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::_M_out_cur_move(long)'
color.o: In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int)':
color.cpp:(.gnu.linkonce.t._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0xd5): undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::_M_out_cur_move(long)'
collect2: ld returned 1 exit status
make: *** [all] Error 1
I am using gcc version 4.02. "g++ -v -H" gives
Code:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.2 (Debian 4.0.2-2)
Does anyone knows what's wrong? (the app compiled just fine on my old slackware 10.1)
Thanx
|