Daniel wrote:
Code directly taken from the tutorial here: http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/tutorial/tuttimer...
Am I supossed to have a boost_thread library? A google search revealed that the gentoo package didn't have it correctly set up, wondering if this could be the cause of the problem?
I just tried the following (with Linux, gcc 3.4.3) on the latest boost development trunk, maybe this will help you: 1. Build all boost libraries as static library with multi-threading enabled:
export BOOST_HOME=~/net/src/boost/devel/trunk cd $BOOST_HOME bjam debug link=static threading=multi stage
2. Compile and link asio tutorial example timer1:
cd libs/asio/example/tutorial/timer1 g++ -pthread -I $BOOST_HOME -o timer1 timer.cpp -L $BOOST_HOME/stage/lib -lboost_system-gcc34-mt-d ./timer1 Hello, world!
IOW, you only need to link to the boost system library, no other boost libs are needed. HTH, Markus