C/C++ error C2011: “timespec”:“struct”类型重定义(转)

一.error C2011: “timespec”:“struct”类型重定义

VS2017 在写程序的时候用到了 pthread.h 库,于是就报错 error C2011: “timespec”:“struct”类型重定义。

error C2011: timespec”:“struct”类型重定义

二.解决办法

在使用的项目属性->预处理器->添加 HAVE_STRUCT_TIMESPEC

C/C++ error C2011: “timespec”:“struct”类型重定义
 

posted on 2022-10-25 15:18  混元真人  阅读(1512)  评论(0)    收藏  举报