I am working on Qt Platform with two separate libraries. The Problem that I am facing is that he two libraries have different declaration for int32_t.
The first library has :
#ifdef _WIN32
#if ULONG_MAX == 0xffffffff
typedef long int32_t;
#else
typedef int int32_t;
#endif
#endif
The second Library :
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
The error that I get is :
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'
I tried following this post on stackoverflow :
Typedef redefinition (C2371) for uint32 in two 3rd-party libraries
And i tried to implement it in my code :
#define int32_t VicTorv3_int32_t
#include"mclmcr.h"
#undef int32_t
#define int32_t Silicon_int32_t
#include "stdint.h"
#undef int32_t
I still get the same error. Please help.