Boost logo

Boost :

From: matthieu (matthieu.bruel_at_[hidden])
Date: 2008-03-12 11:51:15


Hi guys,
I've just install Dev-Cpp 4.9.9.2,
download boost 1.34.1 and boost-jam 3.1.16, extract the archive, build bjam,
then finaly build boost (all libraries).
Everything was fine. Take lots of time, lots of space..
Now I just try to compile and execute a boost example for the threads:
"tennis.cpp" and I've linker Errors :'(
Is there a known problem for these Dev-Cpp release or is it just a
configuration problem on my computer?

I'm under windows 2000 sp4 (at work...)
You'll find all the info under.
Thanks in advance for the help,
Mat

Here is the log from Dev-c++:
Compiler: Default compiler
Executing g++.exe...
g++.exe "D:\Apps\boost_1_34_1\libs\thread\example\tennis.cpp" -o
"D:\Apps\boost_1_34_1\libs\thread\example\tennis.exe" -I"D:\Apps\boost_1_3
4_1" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c+
+\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\i
nclude\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -L"D:\Apps\bo
ost_1_34_1\stage\lib"
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x442):tennis.cpp:
undefined reference to `boost::thread::thread(boost::function0<void,
std::allocator<boost::function_base> > const&)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x500):tennis.cpp:
undefined reference to `boost::thread::thread(boost::function0<void,
std::allocator<boost::function_base> > const&)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x566):tennis.cpp:
undefined reference to `boost::xtime_get(boost::xtime*, int)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x57b):tennis.cpp:
undefined reference to `boost::thread::sleep(boost::xtime const&)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x7ad):tennis.cpp:
undefined reference to `boost::thread::join()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x7b8):tennis.cpp:
undefined reference to `boost::thread::join()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x7cd):tennis.cpp:
undefined reference to `boost::thread::~thread()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x7e2):tennis.cpp:
undefined reference to `boost::thread::~thread()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x80f):tennis.cpp:
undefined reference to `boost::thread::~thread()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x83c):tennis.cpp:
undefined reference to `boost::thread::~thread()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x8b8):tennis.cpp:
undefined reference to `boost::mutex::mutex()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text+0x909):tennis.cpp:
undefined reference to `boost::mutex::~mutex()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9condition10not
ify_allEv[boost::condition::notify_all()]+0x10):tennis.cpp: undefined
reference to `boost::detail::condition_impl::notify_all()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9condition4wait
INS_6detail6thread11scoped_lockINS_5mutexEEEEEvRT_[void
boost::condition::wait<boost::detail::thread::scoped_lock<boost::mutex>
>(boost::detail::thread::scoped_lock<boost::mutex>&)]+0x68):tennis.cpp:
undefined reference to `boost::lock_error::lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9condition4wait
INS_6detail6thread11scoped_lockINS_5mutexEEEEEvRT_[void
boost::condition::wait<boost::detail::thread::scoped_lock<boost::mutex>
>(boost::detail::thread::scoped_lock<boost::mutex>&)]+0xa4):tennis.cpp:
undefined reference to `boost::lock_error::~lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread1
1scoped_lockINS_5mutexEE4lockEv[boost::detail::thread::scoped_lock<boost::mu
tex>::lock()]+0x5b):tennis.cpp: undefined reference to
`boost::lock_error::lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread1
1scoped_lockINS_5mutexEE4lockEv[boost::detail::thread::scoped_lock<boost::mu
tex>::lock()]+0x97):tennis.cpp: undefined reference to
`boost::lock_error::~lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread1
1scoped_lockINS_5mutexEE6unlockEv[boost::detail::thread::scoped_lock<boost::
mutex>::unlock()]+0x5b):tennis.cpp: undefined reference to
`boost::lock_error::lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread1
1scoped_lockINS_5mutexEE6unlockEv[boost::detail::thread::scoped_lock<boost::
mutex>::unlock()]+0x97):tennis.cpp: undefined reference to
`boost::lock_error::~lock_error()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9condition7do_w
aitINS_5mutexEEEvRT_[void
boost::condition::do_wait<boost::mutex>(boost::mutex&)]+0x10):tennis.cpp:
undefined reference to `boost::detail::condition_impl::enter_wait()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9condition7do_w
aitINS_5mutexEEEvRT_[void
boost::condition::do_wait<boost::mutex>(boost::mutex&)]+0x30):tennis.cpp:
undefined reference to `boost::detail::condition_impl::do_wait()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread8
lock_opsINS_5mutexEE4lockERS3_[boost::detail::thread::lock_ops<boost::mutex>
::lock(boost::mutex&)]+0xd):tennis.cpp: undefined reference to
`boost::mutex::do_lock()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread8
lock_opsINS_5mutexEE6unlockERS3_[boost::detail::thread::lock_ops<boost::mute
x>::unlock(boost::mutex&)]+0xd):tennis.cpp: undefined reference to
`boost::mutex::do_unlock()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread8
lock_opsINS_5mutexEE6unlockERS3_RPv[boost::detail::thread::lock_ops<boost::m
utex>::unlock(boost::mutex&, void*&)]+0x14):tennis.cpp: undefined reference
to `boost::mutex::do_unlock(void*&)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost6detail6thread8
lock_opsINS_5mutexEE4lockERS3_RPv[boost::detail::thread::lock_ops<boost::mut
ex>::lock(boost::mutex&, void*&)]+0x14):tennis.cpp: undefined reference to
`boost::mutex::do_lock(void*&)'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9conditionD1Ev[
boost::condition::~condition()]+0x46):tennis.cpp: undefined reference to
`boost::detail::condition_impl::~condition_impl()'
C:\DOCUME~1\MATTHI~1\LOCALS~1\Temp/ccY9aaaa.o(.text$_ZN5boost9conditionC1Ev[
boost::condition::condition()]+0x51):tennis.cpp: undefined reference to
`boost::detail::condition_impl::condition_impl()'
collect2: ld returned 1 exit status

Execution terminated

My g++ version:
C:\Dev-Cpp\bin>g++ -v
Using built-in specs.
Configured with:
../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --tar
get=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-language
s=c,c++,f77
,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-excep
tions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --ena
ble-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
C:\Dev-Cpp\bin>

Thread libs in my lib folder:
D:\Apps\boost_1_34_1\stage\lib>ls -lh | grep thread
-rwxrwxrwx 1 Administrators ???????? 165K Mar 12 11:10
boost_thread-mgw34-mt-1_34_1.a
-rwxrwxrwx 1 Administrators ???????? 332K Mar 12 11:10
boost_thread-mgw34-mt-1_34_1.dll
-rwxrwxrwx 1 Administrators ???????? 418K Mar 12 11:04
boost_thread-mgw34-mt-d-1_34_1.a
-rwxrwxrwx 1 Administrators ???????? 3.8M Mar 12 11:04
boost_thread-mgw34-mt-d-1_34_1.dll
-rwxrwxrwx 1 Administrators ???????? 110K Mar 12 11:22
libboost_thread-mgw34-mt-1_34_1.a
-rwxrwxrwx 1 Administrators ???????? 7.1M Mar 12 11:20
libboost_thread-mgw34-mt-d-1_34_1.a
-rwxrwxrwx 1 Administrators ???????? 110K Mar 12 11:33
libboost_thread-mgw34-mt-s-1_34_1.a
-rwxrwxrwx 1 Administrators ???????? 7.1M Mar 12 11:30
libboost_thread-mgw34-mt-sd-1_34_1.a
D:\Apps\boost_1_34_1\stage\lib>

Rq: if I copy these files directly in the Dev-Cpp lib folder
(C:\Dev-Cpp\lib) and don't put my -L arg in the compilation command, the
result is the same :'(


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk