There are two h-files in which the data type is defined:
- in the first case (wintypes.h) as
typedef unsigned long DWORD; - in the second (stdafx.h) as
typedef uint32_t DWORD, LPDWORD;
The first data type (the wintypes.h file) is needed for functions in the xxx.cpp file being compiled. On the same xxx.cpp, Crypto.h, having #include "stdafx.h" , is connected, and winscard.h, having #include "wintypes.h" . When compiling for Ubuntu, an error occurs:
In file included from Crypto.h:27:0, from xxx.cpp:12: stdafx.h:29:26: error: conflicting declaration 'typedef uint32_t* LPDWORD' typedef uint32_t DWORD, *LPDWORD; ^ In file included from winscard.h:21:0, from xxx.cpp:11: wintypes.h:78:17: note: previous declaration as 'typedef DWORD* LPDWORD' typedef DWORD *LPDWORD; Do not judge strictly, I am still just learning, I may not know much. Please explain how to fix it.