This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
using gcc to compile pthread program with gprof
- From: Aaron Phillips <aaron dot phillips at imagesoft dot fiserv dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 26 Sep 2003 15:21:53 -0400
- Subject: using gcc to compile pthread program with gprof
Hello.
I am using gcc 3.1 on HP-UX 11.0 to compile a threaded program for gprof
support, like this:
$ gcc -D_POSIX_C_SOURCE=199506L -o cont cont.c -lpthread -pg
It compiles fine, but when I execute ./cont I get a bad return code from
pthread_attr_init. The error message is "Function is not available".
When I leave off the -pg everything works fine. Is there some special
linking flags I have to also include?
Thanks much
Aaron