Issues in adding a new API function in pthread

Carlos O'Donell carlos@systemhalted.org
Mon Jun 16 20:24:00 GMT 2008


On Fri, Jun 13, 2008 at 12:52 PM, Dongyoon Lee <dongyoon@gmail.com> wrote:
> [root@localhost TMP]# gcc d.c -o d -lpthread
> /tmp/ccEeiBLd.o(.text+0x179): In function `main':
> : undefined reference to `pthread_setschedprio'
> collect2: ld returned 1 exit status

How did you verify that "-lpthread" causing the linker to link with
the the libpthread.so you just built?

What does "ldd d" show?

>  1397: 0000003b344081c0     3 FUNC    GLOBAL DEFAULT   12 pthread_log2

That should work.

Cheers,
CArlos.



More information about the Libc-help mailing list