概述
出现报错:
undefined reference to `inet_addr@4'
undefined reference to `gethostbyname@4'
undefined reference to `WSAGetLastError@0'
undefined reference to `inet_ntoa@4'
undefined reference to `WSAStartup@8'
undefined reference to `inet_ntoa@4'
undefined reference to `socket@12'
undefined reference to `htons@4'
undefined reference to `bind@12'
undefined reference to `listen@8'
undefined reference to `accept@12'
undefined reference to `recv@16'
undefined reference to `send@16'
undefined reference to `shutdown@8'
undefined reference to `closesocket@4'
undefined reference to `closesocket@4'
undefined reference to `WSACleanup@0'
原因:缺少lib库,编译找不到相应的lib库。
1、setting->compiler and debugger
2、
3、找到codeblocks安装目录下的lib
导入
运行即可!
最后
以上就是文艺流沙为你收集整理的codeblocks解决网络方面错误undefined reference to `inet_ntoa@4'|的全部内容,希望文章能够帮你解决codeblocks解决网络方面错误undefined reference to `inet_ntoa@4'|所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复