C/C++ error C2011: “timespec”:“struct”类型重定义(转)
一.error C2011: “timespec”:“struct”类型重定义
VS2017 在写程序的时候用到了 pthread.h 库,于是就报错 error C2011: “timespec”:“struct”类型重定义。
error C2011: “timespec”:“struct”类型重定义
二.解决办法
在使用的项目属性->预处理器->添加 HAVE_STRUCT_TIMESPEC
VS2017 在写程序的时候用到了 pthread.h 库,于是就报错 error C2011: “timespec”:“struct”类型重定义。
error C2011: “timespec”:“struct”类型重定义
在使用的项目属性->预处理器->添加 HAVE_STRUCT_TIMESPEC