环境搭建
这次为了方便大家当个缝合怪,教程都是网上找的
下载unpv13e
https://blog.csdn.net/weixin_42255821/article/details/110420885
clion环境配置
https://blog.csdn.net/qq_34631813/article/details/120380737
报错
error: redefinition of ‘xxx’问题的解决
修改
https://sanzhou.live/index.php/archives/44/
#ifdef _UNP
#define _UNP
/* The structure returned by recvfrom_flags() /
struct in_pktinfo {
struct in_addr ipi_addr; / dst IPv4 address /
int ipi_ifindex;/ received interface index */
};
#endif
运行,之前教程已经运行服务端,再在clion上运行会报错
打开控制台输入命令
ps -ef|grep daytimetcpsrv
kill -9 进程号
再 ps -ef|grep daytimetcpsrv 检查一下
没有daytimetcpsrv进程再运行就行,再运行clion里的
clion方便查看源代码,有代码提示