Can't profile g++ program

lrtaylor@micron.com lrtaylor@micron.com
Tue Dec 16 20:46:00 GMT 2003


The pthreads library is "libpthread.so" (singular rather than plural).  Are you really linking against libpthreads, or was that just a typo?  If you are, try using -lpthread instead.  IIRC, it seems to me that libthread (no p) is used for Solaris threads (that is, native SunOS threading), and I thought it was independent of pthread.  So, it seems to me that your program should not normally have libthread as a dependency and shouldn't be loading it.  Not sure what to say beyond that, though...

Good luck,
Lyle

-----Original Message-----
From: Assinovsky, Lev [mailto:LAssinovsky@algorithm.aelita.com]
Sent: Tuesday, December 16, 2003 4:49 AM
To: lrtaylor; gcc-help@gcc.gnu.org
Subject: RE: Can't profile g++ program


g++ -pg -g  tst.cpp -o tst -lpthreads

----
Lev Assinovsky
Aelita Software Corporation
O&S InTrust Framework Division, Team Leader
ICQ# 165072909


> -----Original Message-----
> From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
> Sent: Monday, December 15, 2003 8:31 PM
> To: Assinovsky, Lev; gcc-help@gcc.gnu.org
> Subject: RE: Can't profile g++ program
> 
> 
> What was the command line you used to link your program?
> 
> Lyle
> 
> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
> Behalf Of Assinovsky, Lev
> Sent: Monday, December 15, 2003 5:53 AM
> To: gcc-help@gcc.gnu.org
> Subject: Can't profile g++ program
> 
> 
> Hello all!
> To my surprise I can't use option -pg 
> when linking with -lpthreads.
> Program crashing in libthreads (not in libpthreads) during 
> initialization:
> 



More information about the Gcc-help mailing list