This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
[OT] requesting advice/help on egcs cvs/snapshots
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: [OT] requesting advice/help on egcs cvs/snapshots
- From: Brent Verner <brent at linux1 dot org>
- Date: Tue, 9 May 2000 23:30:07 -0400
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;
}