option for g++

Miroslaw Dobrzanski-Neumann mne at mosaic-ag.com
Wed Feb 6 13:03:06 UTC 2002


On Tue, Feb 05, 2002 at 01:45:25PM +0500, ALOK KUMAR VERMA wrote:
> Hello All,
>    I am compiling a thread program. Running from the shell prompt 'g++ 
> myfile.cpp -lpthread' does not give any error. But I need to configure 
> this in KDeveloper also. So I need to specify '-lpthread' option but 
> where do I do it?

With the gcc/g++ you can use -pthread option when compiling and linking. The
compiler uses the correct defines and libraries. You do not need -lpthread at
all.

i.e.
g++ -pthread -c x.cc
g++ -pthread -o x x.o
-- 
Miroslaw Dobrzanski-Neumann

MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne at mosaic-ag.com





More information about the KDevelop-devel mailing list