[EMAIL PROTECTED] writes:
>> This should have worked. What were the errors?
>
> the errors are the same i got not specifying the compiler flag
> -pthread: lots of undefitned references to the pthread library
> functions. maybe my build system is not sane...
Time to find out why pthread_create() and friends are not being
defined.
First a sanity check:
nm /path/to/libpthread.a | grep pthread_create
Here is what the output looks on my system:
$ nm /usr/lib/libpthread.a | grep pthread_create
00000eec T __pthread_create_2_1
00000eec T pthread_create
Assuming you get similar output, this command should provide
further clues:
g++ -static threads_static.c -o threads_static -pthread \
-Wl,--verbose,-ypthread_create
> the executable is meant for an embedded system
Ok, that's about the only time when it is reasonable to link -static.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus