Boost logo

Boost Users :

From: anthony kelly (pinkeye888_at_[hidden])
Date: 2008-01-25 00:24:15


Hello Boost Users,

I am trying to use Boost.Thread in my application. I am compiling on Windows
for Windows using Cygwin GCC with the "no-cygwin" option. Boost.Build is far
too complicated for my application, so I am using a simple Makefile. I don't
mind whether I use Windows threads or POSIX threads, but I have tried both
and I can't get either to work.

Re: Windows threads, I have static linked to "boost_thread-gcc34-mt-1_34_1"
(no plan to use unsupported tss), and I defined BOOST_THREAD_USE_LIB and
BOOST_HAS_WINTHREADS, however I get a lot of error messages about pthread
functions not found.

Have you any idea why I get error messages about using pthread functions
when BOOST_HAS_WINTHREADS is defined? Is there some other macro(s) which
should be defined?

Re: POSIX threads, I have static linked to "boost_thread-gcc34-mt-1_34_1"
and "pthreadGC2" (pthreads-win32), and I defined BOOST_THREAD_USE_LIB and
BOOST_HAS_PTHREADS, however I get an error message that nanosleep is not
found.

I read that nanosleep is part of libc, so I added "c" to my list of static
libraries, which finds nanosleep, but then I receieve other errors which
looks as though I am linked to multiple C runtimes. What is the correct
approach to link nanosleep in this configuration?

If you have any suggestion, please let me know! Thanks in advance for your
time. Kind regards, Anthony

P.S. Is there a resource which can tell me which are the prerequisite
libraries for boost libraries (e.g. pthreads or winsock)? So far, I have had
to guess appropriate libraries based on internet searches for the function
names appearing in "undefined reference" errors, but this seems very clumsy!



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