解决 :error C1083: 无法打开包括文件: “sys/time.h”: No such file or directory

编译MQTT的C库时,test的项目们 出现的问题: fatal error C1083: 无法打开包括文件: “sys/time.h”: No such file or directory

解决办法:注释掉,换用Windows的文件

#include <time.h>
#include <socket.h>
  /*#include <sys/time.h>
  #include <sys/socket.h>
  #include <unistd.h>*/
  #include <errno.h>

sys/time.h是uinx系统下的库文件,而我现在使用的平台是在windows,显然是未指明程序运行的系统。

发布了417 篇原创文章 · 获赞 156 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_34732729/article/details/104397161