This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen2 - NOMINMAX

Tags: None
(comma "," separated)
opt_student
Registered Member
Posts
1
Karma
0

Eigen2 - NOMINMAX

Mon Jan 24, 2011 6:50 pm
Hello,

I am using a C++ program that requires the Eigen2 library. The program needs to be compiled under Windows with a Visual Studio makefile.
Now the following error occurs:

Eigen/Core(75) : fatal
error C1189: #error : The preprocessor symbols 'min' or 'max' are defined. If you are compiling on Windows, do #define NOMINMAX to prevent windows.h from defining these symbols.

Because many other thirdparty libraries are being used, it is difficult to figure out all files where windows.h is included. Is there a way to
insert something like the #define NOMINMAX statement in the makefile, so that it has a global effect?

Thank you.
vernal
Registered Member
Posts
37
Karma
0

Re: Eigen2 - NOMINMAX

Wed Jan 26, 2011 8:53 am
In the project properties, C/C++, Preprocessor: Type NOMINMAX where the other preprocessor values like DEBUG, NDEBUG, WIN32 etc. reside. Order seems not to be important.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft