Проблема с установкой Boost.Asio

я уже установил библиотеки boost с помощью bjam install, но когда я компилирую программу:

#include boost/asio.hpp

int main()
{
 return 0;
}

возникают такие ошибки:

/tmp/ccVR3eeF.o: In function `__static_initialization_and_destruction_0(int, int)':
sda.cpp:(.text+0x52): undefined reference to `boost::system::generic_category()'
sda.cpp:(.text+0x5e): undefined reference to `boost::system::generic_category()'
sda.cpp:(.text+0x6a): undefined reference to `boost::system::system_category()'
/tmp/ccVR3eeF.o: In function `boost::asio::error::get_system_category()':
sda.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[boost::asio::error::get_system_category()]+0x5): undefined reference to `boost::system::system_category()'
/tmp/ccVR3eeF.o: In function `boost::asio::detail::posix_tss_ptr_create(unsigned int&)':
sda.cpp:(.text._ZN5boost4asio6detail20posix_tss_ptr_createERj[boost::asio::detail::posix_tss_ptr_create(unsigned int&)]+0x19): undefined reference to `pthread_key_create'
/tmp/ccVR3eeF.o: In function `boost::asio::detail::posix_tss_ptr<boost::asio::detail::call_stack<boost::asio::detail::task_io_service>::context>::~posix_tss_ptr()':
sda.cpp:(.text._ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_15task_io_serviceEE7contextEED2Ev[boost::asio::detail::posix_tss_ptr<boost::asio::detail::call_stack<boost::asio::detail::task_io_service>::context>::~posix_tss_ptr()]+0x15): undefined reference to `pthread_key_delete'
/tmp/ccVR3eeF.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()':
sda.cpp:(.text._ZN5boost4asio6detail13posix_tss_ptrINS1_10call_stackINS1_14strand_service11strand_implEE7contextEED2Ev[boost::asio::detail::posix_tss_ptr<boost::asio::detail::call_stack<boost::asio::detail::strand_service::strand_impl>::context>::~posix_tss_ptr()]+0x15): undefined reference to `pthread_key_delete'
collect2: ld returned 1 exit status

what я должен делать? как я могу собрать эти библиотеки?

8
задан Benjamin Lindley 18 April 2011 в 21:18
поделиться