Hey, i just apt-get installed libnet1 and libnet1-dev but for some reason when i go to compile any code with them it doesnt appear to be finding many functions and i'm getting linker errors like the following
Code:
:basic.c:(.text+0x171): undefined reference to `libnet_build_dnsv4'
:basic.c:(.text+0x185): undefined reference to `libnet_geterror'
:basic.c:(.text+0x1ed): undefined reference to `libnet_build_udp'
:basic.c:(.text+0x201): undefined reference to `libnet_geterror'
:basic.c:(.text+0x28f): undefined reference to `libnet_build_ipv4'
:basic.c:(.text+0x2a3): undefined reference to `libnet_geterror'
:basic.c:(.text+0x2ca): undefined reference to `libnet_write'
:basic.c:(.text+0x2de): undefined reference to `libnet_geterror'
:basic.c:(.text+0x321): undefined reference to `libnet_destroy'
collect2: ld returned 1 exit status
The code compiles fine for a friend of mine who installed the libraries in the same way (using apt on debian) and it also compiles for me if i do the following
Code:
gcc -o basic basic.c /usr/lib/libnet.a
so i'm unsure why apt hasn't set this up correctly. Has anyone else seen anything like this?
Thanks,
NNP