Boost logo

Boost Users :

From: Raul Huertas Diaz (rhuertas_at_[hidden])
Date: 2002-03-15 02:46:22


On Thu, 14 Mar 2002 14:39:59 +0100
Harm de Laat <harm_at_[hidden]> wrote:

> Hi all,
>
> I'm new to Boost and relativily new to C++. I'm trying to program threads on my Redhat 7.2 linux.
>
> I have the following code:
>
> ...
> The code compiles without any problems... But do I have link it against some library? Because I cannot link it to an
> executable file. I'm new to this. So can somebody please be so kind to help me and describe the steps nessecary to run
> this Thread example file...
>

I have compiled, in Linux, with:
gcc -c ... \
-D_REENTRANT \
-D_THREAD_SAFE \
-D_GNU_SOURCE

And have, succesfully, linked with:
gcc ... \
-D_REENTRANT \
-D_THREAD_SAFE \
-D_GNU_SOURCE \
-lboost_thread \
-lpthread \
-lstdc++

One interesting thing I have to do to link, is to set, in LD_LIBRARY_PATH, the lib directory of gcc:
/opt/gcc/lib
(I think that libgcc_s.so.1 is needed in link-time ¿?)

Hope this works...

> Many Thanks,
>
> Harm de Laat
> Informatiefabriek
> The Netherlands
 
 

-- 
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