error C2011: 'timespec': 'struct' type redefinition 另一种解法
在#include <pthread.h>之前 加上这一句:
#define HAVE_STRUCT_TIMESPEC
#include <stdio.h>
#include <stdlib.h>
#define HAVE_STRUCT_TIMESPEC
//加在这里。
#include <pthread.h>
#include <windows.h>
#include <errno.h>
博客针对 'error C2011: 'timespec': 'struct' type redefinition' 问题给出另一种解法,即在#include <pthread.h>之前加上#define HAVE_STRUCT_TIMESPEC,还给出了代码示例,包含多个头文件引用。
1198

被折叠的 条评论
为什么被折叠?



