This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Linux multithread option, pthread , D_REENTRANT


Use -pthread both at compile time and at link time.  This will cause
_REENTRANT to be defined, so you don't need to add it yourself.

Just in case there's any confusion, this will only set up compile and
link time options for building a multithreaded program.  This will not
make a non-thread program multi-threaded.  You have to do that yourself
in the program, and then use the -pthread option when building.

Thanks,
Lyle


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of sadf sadf
Sent: Friday, June 11, 2004 2:19 PM
To: gcc-help@gcc.gnu.org
Subject: Linux multithread option, pthread , D_REENTRANT 

Hi,
I want to build multithread option on Linux.
I am using gcc 3.2.x version.

I have found, I have to use -pthread option. Is it
correct option, to make my application multithreaded?

Do I have to use this option for compile time or/&
link time?

Do I have to use the "-D_REENTRANT" option, at
compiler time time?

Is there any other command line option should I add,
to make my application multithreaded?

Thank you,
Avin Patel


 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]