Boost logo

Boost :

From: Trey Jackson (tjackson_at_[hidden])
Date: 2003-12-01 19:34:06


All,

Real silly question here, but I don't see the documentation on
boost.org (but it was discussed a while back on the mailing list)...

I downloaded/installed boost 1_30_2, configured and built boost. I'm
running on Linux.

I built the threads libraries like so:
    ./bin.linuxx86/bjam -sBUILD="<threading>multi release" -s"TOOLS=gcc-stlport"

Bu default, our project is not using threads. We're able to use the
(other) boost libraries just fine.

When I try to build with threads (by including
<boost/thread/thread.hpp>) I get the error "Thread support is
unavailable!"

What is the *right* way to set our build up?

Is it:

default configuration
---------------------
   Compile time switches: none
   Link time switches: -lpthread

thread configuration
--------------------
   Compile time switches: -DBOOST_USER_CONFIG=\"boost/config/user/linux_gcc_stlport_threads.hpp\"
   Link time switches: -lpthread

And to generate the linux_gcc_stlport_threads.hpp I'd do
something like:

export CXX="g++"
export CXXFLAGS="-DUSE_STLPORT -I<path-to-stlport>"
export LIBS="-L<path-to-stlport> -lstlport_gcc -lpthread"
./configure

My problem is, even when using the config file generated by the above
./configure doesn't appear to set the variable BOOST_HAS_THREADS,
it only sets:

,----------------
| #define BOOST_MSVC6_MEMBER_TEMPLATES
| #define BOOST_HAS_UNISTD_H
| #define BOOST_HAS_STDINT_H
| #define BOOST_HAS_SLIST
| #define BOOST_HAS_SIGACTION
| #define BOOST_HAS_SCHED_YIELD
| #define BOOST_HAS_PTHREADS
| #define BOOST_HAS_PTHREAD_YIELD
| #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
| #define BOOST_HAS_PARTIAL_STD_ALLOCATOR
| #define BOOST_HAS_NRVO
| #define BOOST_HAS_NL_TYPES_H
| #define BOOST_HAS_NANOSLEEP
| #define BOOST_HAS_LONG_LONG
| #define BOOST_HAS_HASH
| #define BOOST_HAS_GETTIMEOFDAY
| #define BOOST_HAS_DIRENT_H
| #define BOOST_HAS_CLOCK_GETTIME
`----------------

So I cannot build anything that has the line:

  #include <boost/thread/thread.hpp>

What am I doing wrong?

Thanks for your help,

TJ

-- 
Trey Jackson
tjackson_at_[hidden]
"Drinking American beer is like making love in a boat.
 It's close to water."
-- Nick Faldo

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk