Couldn't link library libnl

Pedro Francisco pedrogfrancisco at gmail.com
Tue Mar 30 19:10:38 EDT 2010


A Quarta 13 Janeiro 2010 05:43:59 Cuthbert Kao escreveu:
> Hi folks,
> 
>    I am newbie to linux application programming and got a problem of
>  linking standard library 'libnl.so'. Here my test code:
> 
-snip
> 
> Then, compile and link my code with libnl:
> 
> $ gcc test.c
> /tmp/ccJh2gSl.o: In function `main':
> test.c:(.text+0x12): undefined reference to `nl_handle_alloc'
> collect2: ld returned 1 exit status
> 
-snip
> 
> The header file and library seem to be in the right place but why I can not
> link the library successfully??
> Is there any one know where I was wrong or missed? Thanks in advance.
> 
> Cuthbert
> 

try:
$ gcc test.c -lnl

--
Pedro



More information about the libnl mailing list