using gcc to compile pthread program with gprof

Aaron Phillips aaron.phillips@imagesoft.fiserv.com
Fri Sep 26 19:31:00 GMT 2003


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



More information about the Gcc-help mailing list