I'v got nuts, please help me with the g++ option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Mr./Madam,
   I installed a Redhat9(shrike), g++ 3.2.2 , libgcc
3.2.2, got Segmentation fault when using
pthread_create function. the try program is very
simply, please tell me which header file and library i
should use when linking.

following is my program

#include <>
#include <pthread.h>
void * threadproc(void*p)
{
printf("dd\n");
}
int main(int argc,char** argv)
{
pthread_t * thread;
pthread_create(thread,NULL,threadproc,NULL);
pthread_join(*thread,NULL);
return 1;
}


Thanks & Regards,

joshua



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux