C dhcpctl linking error

Sztrepka Pál szpal at szarvas.hu
Fri Dec 7 09:59:54 UTC 2012


Hi List,

I ask some help about compiling and linking my c dhcp dhcpctl code.
When i try compile from the example code (appended in the dhcp package) 
i get the below linking error:

nnetd.c:(.text.startup+0x1a): undefined reference to 
`dhcpctl_initialize'
nnetd.c:(.text.startup+0x46): undefined reference to 
`dhcpctl_new_authenticator'
nnetd.c:(.text.startup+0x6a): undefined reference to `dhcpctl_connect'

I compile with this way:
    gcc -Wall -O2   -c -o nnetd.o nnetd.c
       It's ok, object file is created

But, when i try linking whit this command:
    gcc -Wall -O2 -ldhcpctl -lomapi -ldst nnetd.o -o nnetd
       I get the above error.. :-(

I tried search solution for this problem over the net (google), but not 
found anywhere,
only the silimar questions.
I checked the related lib files in the /usr/lib directory, and those 
are in that place.
(libdhcpctl.a, libomapi.a, libdst.a)

My system is: Archlinux with dhcp 4.2.4.2-1 (and bind 9.9.2-2) from 
distro, but I tried compile the dhcp package
from source (dhcp-4.2.4-P2.tar.gz), and same error..

I have no more idea, what I do wrong?

--
  szpal



More information about the dhcp-users mailing list