boost newbie questions
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:
#include <iostream>
#include
On Thu, 14 Mar 2002 14:39:59 +0100
Harm de Laat
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@tcpsi.es http://www.tcpsi.es
participants (2)
-
Harm de Laat
-
Raul Huertas Diaz