Boost logo

Boost Users :

Subject: Re: [Boost-users] boost:thread compiling problem
From: Shaolin (shaolinfinest_at_[hidden])
Date: 2009-08-21 22:26:42


Ok, the lib issues have been fixed. I have configured it all properly and I
am not longer getting the 'dir not found errors'. I am alas getting a new
error.

// This is what I enter in commandline
$ g++ -I /usr/local/boost_1_39_0 filereader.cc -o fr
-L~/usr/local/boost_1_39_0/boost/stage/lib/libboost_thread-gcc43-mt-1_39.a

// ERROR MSG:
/tmp/ccv0fHxn.o: In function `main':
filereader.cc:(.text+0x3f0): undefined reference to
`boost::thread::~thread()'
/tmp/ccv0fHxn.o: In function `boost::mutex::mutex()':
filereader.cc:(.text._ZN5boost5mutexC1Ev[boost::mutex::mutex()]+0x45):
undefined reference to
`boost::thread_resource_error::thread_resource_error()'
filereader.cc:(.text._ZN5boost5mutexC1Ev[boost::mutex::mutex()]+0x4d):
undefined reference to
`boost::thread_resource_error::~thread_resource_error()'
filereader.cc:(.text._ZN5boost5mutexC1Ev[boost::mutex::mutex()]+0x55):
undefined reference to `typeinfo for boost::thread_resource_error'
/tmp/ccv0fHxn.o: In function `boost::detail::thread_data<void
(*)()>::~thread_data()':
filereader.cc:(.text._ZN5boost6detail11thread_dataIPFvvEED0Ev[boost::detail::thread_data<void
(*)()>::~thread_data()]+0x16): undefined reference to
`boost::detail::thread_data_base::~thread_data_base()'
/tmp/ccv0fHxn.o: In function `boost::detail::thread_data<void
(*)()>::~thread_data()':
filereader.cc:(.text._ZN5boost6detail11thread_dataIPFvvEED1Ev[boost::detail::thread_data<void
(*)()>::~thread_data()]+0x16): undefined reference to
`boost::detail::thread_data_base::~thread_data_base()'
/tmp/ccv0fHxn.o: In function
`boost::condition_variable::condition_variable()':
filereader.cc:(.text._ZN5boost18condition_variableC1Ev[boost::condition_variable::condition_variable()]+0x3a):
undefined reference to
`boost::thread_resource_error::thread_resource_error()'
filereader.cc:(.text._ZN5boost18condition_variableC1Ev[boost::condition_variable::condition_variable()]+0x42):
undefined reference to
`boost::thread_resource_error::~thread_resource_error()'
filereader.cc:(.text._ZN5boost18condition_variableC1Ev[boost::condition_variable::condition_variable()]+0x4a):
undefined reference to `typeinfo for boost::thread_resource_error'
/tmp/ccv0fHxn.o: In function
`boost::detail::thread_data_base::thread_data_base()':
filereader.cc:(.text._ZN5boost6detail16thread_data_baseC2Ev[boost::detail::thread_data_base::thread_data_base()]+0x1b):
undefined reference to `vtable for boost::detail::thread_data_base'
/tmp/ccv0fHxn.o: In function `boost::thread::thread<void (*)()>(void (*)(),
boost::disable_if<boost::is_convertible<void (*&)(),
boost::detail::thread_move_t<void (*)()> >, boost::thread::dummy*>::type)':
filereader.cc:(.text._ZN5boost6threadC1IPFvvEEET_NS_10disable_ifINS_14is_convertibleIRS4_NS_6detail13thread_move_tIS4_EEEEPNS0_5dummyEE4typeE[boost::thread::thread<void
(*)()>(void (*)(), boost::disable_if<boost::is_convertible<void (*&)(),
boost::detail::thread_move_t<void (*)()> >,
boost::thread::dummy*>::type)]+0x32): undefined reference to
`boost::thread::start_thread()'
/tmp/ccv0fHxn.o:(.rodata._ZTIN5boost6detail11thread_dataIPFvvEEE[typeinfo
for boost::detail::thread_data<void (*)()>]+0x8): undefined reference to
`typeinfo for boost::detail::thread_data_base'
collect2: ld returned 1 exit status

2009/8/21 Steven Watanabe <watanabesj_at_[hidden]>

> AMDG
>
> Shaolin wrote:
>
>> Ok, I have reconfigured it and the file is now located in the boost_1_39_0
>> directory. However, it still doesnt work. This is what I type in command
>> line:
>>
>> g++ -I /usr/local/boost_1_39_0 test.cc -o example \
>> ~/stage/lib/libboost_thread-gcc43-mt-1_39.a
>>
>>
>
> Does ~/stage/lib/libboost_thread-gcc43-mt-1_39.a exist?
> From what you say below I doubt it, so of course it doesn't
> work.
>
> *stage directory*:
>> /usr/local/boost_1_39_0/stage/lib/libboost_thread-gcc43-mt-1_39.a
>>
>>
>
> Assuming that this is the actual location of the library, use
> -L/usr/local/boost_1_39_0/stage/lib -lboost_thread-gcc43-mt-1_39
>
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net