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@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of sadf sadf Sent: Friday, June 11, 2004 2:19 PM To: gcc-help@xxxxxxxxxxx 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/