By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

gcc -pthread option for Linux

P: n/a
Hi,
I am using the Red Hat Linux 9.0 & gcc 3.2
I am trying to make multithreaded library from my c/c++ source code.

Do I have to use -pthread gcc option during compile time, or this
option is for HPUX only.

Thank you,
Avin Patel
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Avin <av******@hotmail.com> spoke thus:
I am using the Red Hat Linux 9.0 & gcc 3.2
I am trying to make multithreaded library from my c/c++ source code. Do I have to use -pthread gcc option during compile time, or this
option is for HPUX only.


Your post is off-topic for comp.lang.c++. Please visit

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #2

P: n/a
av******@hotmail.com (Avin) wrote in message news:<a0**************************@posting.google. com>...
Hi,
I am using the Red Hat Linux 9.0 & gcc 3.2
I am trying to make multithreaded library from my c/c++ source code.

Do I have to use -pthread gcc option during compile time, or this
option is for HPUX only.


I think you need -D_REENTRANT for one so libraries will use
reentrant versions of their code. Moreover you probably need
-lpthread, but you will understand that if the linker reports
undefined references to pthread_ functions.

Gerald
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.