Boost logo

Boost Users :

Subject: [Boost-users] this_thread::sleep + undefined reference?
From: John D (cononet_at_[hidden])
Date: 2008-12-15 16:55:03


Hello

This will be an exceptionally stupid problem for whomever is kind enough to
clarify a cause and solution.
I will keep it brief in hopes that it is not an issue in need of complexity.

The code:

boost::this_thread::sleep(boost::posix_time::milliseconds(20));

The attempt:

g++ -lcurl -lboost_thread -lpthread -pthread c.cpp -o app
/tmp/cc2YRa76.o: In function `void
boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration,
1000ll>
>(boost::date_time::subsecond_duration<boost::posix_time::time_duration,
1000ll> const&)':
c.cpp:(.text._ZN5boost11this_thread5sleepINS_9date_time18subsecond_durationINS_10posix_time13time_durationELx1000EEEEEvRKT_[void
boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration,
1000ll>
>(boost::date_time::subsecond_duration<boost::posix_time::time_duration,
1000ll> const&)]+0x50): undefined reference to
`boost::this_thread::sleep(boost::posix_time::ptime const&)'
collect2: ld returned 1 exit status

I will post more code if need be, but even general guidance will likely lead
me to a solution.

Thanks
John



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