Boost logo

Boost Users :

From: Raul Huertas Diaz (rhuertas_at_[hidden])
Date: 2002-03-27 05:14:25


El Tue, 26 Mar 2002 13:48:18 -0000
"Dale Peakall" <dale.peakall_at_[hidden]> escribió:

> gcc version: 3.0.3 - thread model: posix
> ld version: GNU ld 2.11.2 (with BFD 2.11.2)
> boost: 1.27.0
>
> I've applied the unclosed extern "C" fix to once.cpp,
> removed the unsupported -pthread option from gcc-tools.jam,
> and built the thread library using jam with no errors.
>
> Has anyone compiled anything using this environment that
> uses boost.threads?

Yes. And it works great. (Ok, we haven't put it to the limit, but...)
 
> A v.simple (completely pointless) test fails for me:
>
> ...snip...
>
> g++ -c -g -I/home/peakalld/boost_1_27_0 main.cpp
> g++ -o
> thread_test -L/home/peakalld/boost_1_27_0/libs/thread/build/bin/libboost_thr
> ead/gcc/debug/runtime-link-dynamic -lboost_thread -lpthread -lposix4 main.o
> main.o: In function `main':
> ...
>
> Any thoughts appreciated.

In Solaris, the order of the libraries and objects, in link time, _does_ matter.
So, instead of:
-lboost_thread -lpthread -lposix4 main.o
you have to put
main.o -lboost_thread -lpthread -lposix4

That way, it works.

 
> - Dale.

-- 
Raúl Huertas Díaz
Redes y Comunicaciones
Ingeniero de Sistemas
TCP Sistemas e Ingenieria
Fernández Caro, 7, 3ª planta
Tel.: +34 91 367 32 79 (Ext. 535)
Fax:  +34 91 407 71 39
rhuertas_at_[hidden]
http://www.tcpsi.es

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