Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7782 Discussions

Building Qt5 with Intel compiler error

alizadeh91
Beginner
203 Views
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
203 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
203 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