HPUX-10.20 / egcs-1.1b (c++) / pthreads

Mike Romberg romberg@fsl.noaa.gov
Mon Sep 28 16:28:00 GMT 1998


  I'm having a small problem with egcs-1.1 which perhaps someone out
there could help me with.  I configured egcs-1.1b as follows:

./configure --with-gnu-as --prefix=/usr/local/egcs-1.1b

  It seems to work fine except for linking c++ programs.  The
following "hello world" example:

#include <iostream.h>
int main()
{
  cerr << "Hello World" << endl;
  return 0;
}

Produces the following when linked with egcs:

orca(afps) > c++ test.C 
/usr/ccs/bin/ld: Unsatisfied symbols:
   pthread_once (code)
   pthread_setspecific (code)
   pthread_getspecific (code)
   pthread_keycreate (code)
collect2: ld returned 1 exit status

  It of course works when I include the dce library:

c++ test.C -ldce

  I am wondering if this is "normal"?  Or, if I can tell egcs (c++) to
always link with -ldce like it does with libstdc++?  If a can add in
this extra library, a short example would be greatly appreciated.

Thanks,

Mike Romberg (romberg@fsl.noaa.gov)



More information about the Gcc mailing list