Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Missing library for MX lookup

15 views
Skip to first unread message

James Moe

unread,
Jan 30, 2015, 1:07:28 PM1/30/15
to
Hello,
I am looking into some code for DNS MX lookup. It compiles but is
missing a library for building the executable.
Can anyone suggest which library contains the missing functions?

c++ mx-lookup.cpp
/tmp/ccRz24GU.o: In function `MXLookup(char const*)':
mx-lookup.cpp:(.text+0x99): undefined reference to `__res_query'
mx-lookup.cpp:(.text+0xc6): undefined reference to `ns_initparse'
mx-lookup.cpp:(.text+0x10a): undefined reference to `ns_parserr'
mx-lookup.cpp:(.text+0x196): undefined reference to `ns_get16'
mx-lookup.cpp:(.text+0x1cd): undefined reference to `ns_name_uncompress'
collect2: error: ld returned 1 exit status


--
James Moe
jmm-list at sohnen-moe dot com

Öö Tiib

unread,
Jan 30, 2015, 1:31:42 PM1/30/15
to
You should link with -lresolv (libresolv)

James Moe

unread,
Jan 30, 2015, 2:08:22 PM1/30/15
to
On 01/30/2015 11:31 AM, Öö Tiib wrote:
> You should link with -lresolv (libresolv)
>
Thank you!
0 new messages