Oh, building also with -lnl works!
But... must it be necessary?
And anyway, using function pcap_findalldevs() doesn't work, also ending with undefined reference to error. And this function should be in libpcap 1.1.1, which is also in Ubuntu and it works here.