Red Hat Bugzilla – Bug 3378
Linking pThreads and STL libraries together.
Last modified: 2008-05-01 11:37:50 EDT
I have tried to get help from the news groups but was
unsuccessful. I just installed RedHat 6.0 and trying to
create a simple program that uses both the STL and pThreads
libraries and seem to be having problems with the link. I
can create programs that use either library but not both
The compile line is:
$(CC) $(CFLAGS) -D_REENTRANT qtest.c -o qtest -lpthread
Could you give this a try and let me know.
Could you reply to this message with an attached qtest.c? Thanks ...
------- Email Received From "Allen Curtis" <email@example.com> 06/10/99 16:08 -------
If I link using the enclosed makefile, I get errors (such as
"undefined reference to `cerr'"). However, if I either (a)
change the "cc" command to "c++" or (b) add "-lstdc++" to the
cc command (after "-lpthread"), it links fine.