开发者

Undefined reference errors in gcc

gcc link results with e开发者_如何学Crrors:

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?


Adding -lresolv solved this for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜