|
Boost Users : |
Subject: Re: [Boost-users] this_thread::sleep + undefined reference?
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-12-16 03:26:23
"John D" <cononet_at_[hidden]> writes:
> 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
With gcc you usually need to put the library flags after everything
else to ensure they are searched in the right order:
g++ -pthread c.cpp -o app -lcurl -lboost_thread -lpthread
Have you tried that?
Anthony
-- Anthony Williams Author of C++ Concurrency in Action | http://www.manning.com/williams Custom Software Development | http://www.justsoftwaresolutions.co.uk Just Software Solutions Ltd, Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK
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