Reputation: 9407
I am on Windows 10 - 64 bits.
Goal:
I am trying to build this Open Source application QCAD and following there Instructions in Compiling QCAD from Sources. Following "Windows" section, I have done this:
Problem:
Once I build in QT Creator as MSVC2013->Debug->Mainwindow, I get 8 duplicated errors:
D:\VisualStudio2015\VC\include\stdint.h:17: error: C2371: 'int8_t': redefinition; different basic types
If I search for int8_t
I find bunch of its usage and couple of its definitions:
One in spatialindex\capi\sidx_config.h
:
#if _MSC_VER <= 1500
typedef __int8 int8_t;
//..
typedef unsigned __int8 uint8_t;
//..
#endif
One in spatialindex\tools\tools.h
#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && !defined __GNUC__ && _MSC_VER!=1800 && _MSC_VER!=1600
typedef __int8 int8_t;
//..
typedef unsigned __int8 uint8_t;
// ..
Now if I comment out both statements in the second definition (In tools.h
) I get some warnings and an error:
dependent '............\Q-CAD\src\3rdparty\qt-labs-qtscriptgenerator-5.5.0\generated_cpp\com_trolltech_qt_core\qtscript_Global.cpp' does not exist.
Attempts:
If I do what this guy did (He asks about the same error within the post), the dependent error persists.
I don't want to change any definitions like the answer in visual studio 2008 error C2371: 'int8_t' : redefinition; different basic types (http_parser.h).
Can you help me accomplish this?
EDIT:
"Now if I comment out both statements in the second definition" I just commented these couple lines in Tools.h: (No accidents occurred and if I un-comment them I get the previous error).
Upvotes: 0
Views: 2680
Reputation: 9407
For some reason, when I un-checked the "Shadow Build" in Projects Settings
of QT Creator on all: Debug, Profile and Release; and I ReBuilt All, It worked like a charm.
It took some time to ReBuild though.
Upvotes: 0
Reputation: 1733
From the supported platforms, it only mentions msvc2010 and msvc2013; you are trying to build using msvc2015 which is not supported. Try to change the compiler and see if it works.
Upvotes: 1