2

gcc link results with errors:

dns.cpp: undefined reference to '__res_querydomain'
dns.cpp: undefined reference to '__dn_skipname'    
dns.cpp: undefined reference to '__dn_expand'
dns.cpp: undefined reference to '__res_query'

Is there another library that I need to link to?

1
  • I added -llibresolv, but now I get: /lib/bin/ld: cannot find -llibresolv Commented Jul 21, 2011 at 12:11

1 Answer 1

4

Adding -lresolv solved this for me.

Sign up to request clarification or add additional context in comments.

1 Comment

Please dont add such solutions as answers..Please add such solutions as comments below the question itself..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.