This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[OT] requesting advice/help on egcs cvs/snapshots


Hi,

    I've ran into a bit of trouble compiling some code that links
to libpthread. I'm not sure where the problem lies, glibc, g++,
binutils, etc., so if one of you with a _working_ system can get
the following prog to compile and run successfully, I'd appreciate
knowing the versions of glibc, g++, binutils you are using so I can
continue work using the new STL - which _is_ rockin' btw :)

FWIW, this segfaults at exit when I run it.

Thanks,
    Brent

===========================

#include <iostream>
extern "C" {
#include <pthread.h>
}

using namespace std;

void* 
runme(void* arg)
{
  cout << "running me" << endl;
  pthread_exit((void*)0);
}

int
main(int argc, char** argv)
{
  pthread_t th;
  cout << "creating thread" << endl;
  pthread_create(&th, NULL, runme, (void*)0);
  if( pthread_join(th, NULL) ){
    cout << "join error" << endl;
  }
  cout << "thread joined" << endl;
  return 0;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]