Building Qt5 with Intel compiler error

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();}

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today