Community
cancel
Showing results for 
Search instead for 
Did you mean: 
alizadeh91
Beginner
69 Views

Building Qt5 with Intel compiler error

Hi all...
I've tried to build Qt5 with Intel compiler, but there is some error while configuring:

C:\\Qt\\qt5\\qtbase\\include\\QtCore/../../src/corelib/tools/qdatetime.h(125):
error:expected an identifier
static inline qint64 maxJd() { return (std::numeric_limits::max()) / 2; }
^

C:\\Qt\\qt5\\qtbase\\include\\QtCore/../../src/corelib/tools/qdatetime.h(125):
error:expected an expression
static inline qint64 maxJd() { return (std::numeric_limits::max()) / 2; }


the same errors for:

static inline qint64 minJd() { return std::numeric_limits::min() / 2; }
static inline qint64 nullJd() { return std::numeric_limits::min();}
0 Kudos
2 Replies
TimP
Black Belt
69 Views

It looks like this error pertains to incomplete preceding syntax.
Not much can be done without the pre-processed file, which may give a clue about what went wrong.
You might compare pre-processed file associated with a successful build using another compiler.
For example, if you are building on linux or Mac, you would want to assure that it will build with the active g++.
Judith_W_Intel
Employee
69 Views


I suspect you may have included some header before this header that has a macro definition of min/max, i.e.:

#define max
#define min

so when they get expanded here you get strange syntax errors.

The way to confirm this is to preprocess the file (using -E or -P) and see what the sources look like after preprocessing.

Judy
Reply