Simple Link problem
I link my program with this
g++ -0 unittest unittest.cpp baseobject.cpp thread.cpp libthread.a
which results in Segmentation Fault when being run
on
pthread_create (&tid, NULL, &my_func, NULL);
Why there is seg fault when the linker did not complain?
I ran it thru the debugger, i found my_func to be not NULL and tid is 0, what is the problem? is it some dynamic library or static library link problems?
Thanks
Jack
|