how to link a posix function

John Zhou zjzhou at newrocktech.com
Thu Feb 12 20:12:30 EST 2004


Hi,

I wrote a program that used some POSIX function such as timer_create(),
timer_settime(), timer_delete(). But, it is report "undefined reference
to 'timer_create', etc.." when linking.

my question is: how to link with POSIX lib?

I know I must add "-lpthread" flag in Makefile when linking
pthread_create() function.

Best Regards,
John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list