0

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:

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).

enter image description here

Community
  • 1
  • 1
Khalil Khalaf
  • 9,259
  • 11
  • 62
  • 104
  • Who did the `#include `? You or the project? Users should not redefine Standard symbols & should update old projects to remove them. As you can edit the headers, commenting out its redefinitions is probably the best you can do unless/until you get a fixed version. ... **or** maybe this project expects you to compile with pre-C++11 settings to avoid the Standardised `int_t` types. About "if I comment out both statements in the second definition (In tools.h) I get some warning[s] and an error", that doesn't make sense, so probably you accidentally commented out an `#endif` or something – underscore_d Aug 17 '16 at 15:12
  • @underscore_d Not me. I did not do anything in the code except the comment part. And regarding the comment part, see edited please. – Khalil Khalaf Aug 17 '16 at 15:20

2 Answers2

1

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.

vicrucann
  • 1,703
  • 1
  • 24
  • 34
0

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.

Khalil Khalaf
  • 9,259
  • 11
  • 62
  • 104