Boost logo

Boost Users :

Subject: Re: [Boost-users] Asio does not compile
From: Alessandro Candini (candini_at_[hidden])
Date: 2011-08-30 06:09:04


On 30/08/11 12:04, Andreas Wehrmann wrote:
> On 08/30/2011 11:08 AM, Alessandro Candini wrote:
>> My code (simplyfication of this:
>> http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/tutorial/tuttimer1/src.html):
>>
>> #include <iostream>
>> #include </usr/local/include/boost/asio.hpp> // Boost version 1.47.0
>> int main() { return 0; }
>>
>> Compilation command:
>> g++ -Wall -o timer1 timer1.cpp
>>
>> Error:
>> /tmp/ccGUgnoD.o: In function
>> `__static_initialization_and_destruction_0(int, int)':
>> timer1.cpp:(.text+0x52): undefined reference to
>> `boost::system::generic_category()'
>> timer1.cpp:(.text+0x5e): undefined reference to
>> `boost::system::generic_category()'
>> timer1.cpp:(.text+0x6a): undefined reference to
>> `boost::system::system_category()'
>> /tmp/ccGUgnoD.o: In function
>> `boost::asio::error::get_system_category()':
>> timer1.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[boost::asio::error::get_system_category()]+0x5):
>> undefined reference to `boost::system::system_category()'
>> /tmp/ccGUgnoD.o: In function
>> `boost::asio::detail::posix_tss_ptr_create(unsigned int&)':
>> timer1.cpp:(.text._ZN5boost4asio6detail20posix_tss_ptr_createERj[boost::asio::detail::posix_tss_ptr_create(unsigned
>> int&)]+0x19): undefined reference to `pthread_key_create'
>> /tmp/ccGUgnoD.o: In function
>> `boost::asio::detail::posix_tss_ptr<boost::asio::detail::call_stack<boost::asio::detail::task_io_service>::context>::~posix_tss_ptr()':
>> timer1.cpp:(.text._ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_15task_io_serviceEE7contextEED2Ev[_ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_15task_io_serviceEE7contextEED5Ev]+0x15):
>> undefined reference to `pthread_key_delete'
>> /tmp/ccGUgnoD.o: In function
>> `boost::asio::detail::posix_tss_ptr<boost::asio::detail::call_stack<boost::asio::detail::strand_service::strand_impl>::context>::~posix_tss_ptr()':
>> timer1.cpp:(.text._ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_14strand_service11strand_implEE7contextEED2Ev[_ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_14strand_service11strand_implEE7contextEED5Ev]+0x15):
>> undefined reference to `pthread_key_delete'
>> collect2: ld returned 1 exit status
>> make: *** [all] Error 1
>>
>> Any ideas?
>>
>> Thanks in advance.
>>
>
> What platform are you trying to build that for?
>
> Regards
>

A 64 bit architecture:

Linux office-007 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

-- 
Alessandro Candini
MEEO S.r.l.
Via Saragat 9
I-44122 Ferrara, Italy
Tel: +39 0532 1861501
Fax: +39 0532 1861637
http://www.meeo.it
========================================
"ATTENZIONE:le informazioni contenute in questo messaggio sono
da considerarsi confidenziali ed il loro utilizzo è riservato unicamente
al destinatario sopra indicato. Chi dovesse ricevere questo messaggio
per errore è tenuto ad informare il mittente ed a rimuoverlo
definitivamente da ogni supporto elettronico o cartaceo."
"WARNING:This message contains confidential and/or proprietary
information which may be subject to privilege or immunity and which
is intended for use of its addressee only. Should you receive this
message in error, you are kindly requested to inform the sender and
to definitively remove it from any paper or electronic format."

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