Results 1 to 2 of 2
Hi,
I looled for a way of queriying an MX record of a particular domain.
After googling with different keyword, I found the article "E-mail Architecture part II" ( http://www.linuxforums.org/network/e...e_part_ii.html ...
- 08-08-2008 #1
DNS MX Query in C
Hi,
I looled for a way of queriying an MX record of a particular domain.
After googling with different keyword, I found the article "E-mail Architecture part II" ( http://www.linuxforums.org/network/e...e_part_ii.html )
I tried to compile the code with gcc without modifiying it, and I have the following error message:
Is there another library to include to use these functions ?Code:gcc mx.c /tmp/ccglAdMp.o: In function `getmxip': mx.c:(.text+0x109): undefined reference to `__res_query' mx.c:(.text+0x221): undefined reference to `__dn_skipname' mx.c:(.text+0x2b9): undefined reference to `__dn_expand' mx.c:(.text+0x3ab): undefined reference to `__dn_expand'
Thanks
- 08-09-2008 #2
I found the solution: I just had to compile with -lresolv option.


Reply With Quote