我正在使用两个独立的库的Qt平台。我面临的问题是他的两个库对int32_t有不同的声明。第三方库冲突的定义/ redefinitons
的第一库具有:
#ifdef _WIN32
#if ULONG_MAX == 0xffffffff
typedef long int32_t;
#else
typedef int int32_t;
#endif
#endif
第二图书馆:
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
,我得到的错误是:
C:\Program Files (x86)\SiliconSoftware\Runtime5.1\include\msinttypes\stdint.h:91: error: C2371: 'int32_t' : redefinition; different basic types c:\program files (x86)\matlab\r2008a\extern\include\mclmcr.h:216: see declaration of 'int32_t'
我尝试下面这个职位上计算器:
Typedef redefinition (C2371) for uint32 in two 3rd-party libraries
,我试图实现它在我的代码:
#define int32_t VicTorv3_int32_t
#include"mclmcr.h"
#undef int32_t
#define int32_t Silicon_int32_t
#include "stdint.h"
#undef int32_t
我仍然得到同样的错误。请帮忙。