[SOLVED] Qt5 + VS2010 QDateTime => not enough actual parameters for macro 'min' & 'max'
-
wrote on 12 Jul 2013, 17:55 last edited by
MaximAlien: have you tried "/DNOMINMAX"?
or DEFINES += NOMINMAX with qmake?
-
wrote on 12 Jul 2013, 18:00 last edited by
Thanks for help Laszlo! Defining @DEFINES += NOMINMAX@ in pro file helped me.
-
wrote on 29 Jul 2013, 09:20 last edited by
Use this include "#include <*qt_*windows.h>" instead of #include <windows.h>
-
wrote on 29 Jul 2013, 09:47 last edited by
sdolard: the problem is that, it does more than what you need, so not compact enough. :)
More importantly, you need to find and maintain the right place for the include. If you do it in the build system, it always works.
Also, even though qt_windows.h is installed publicly, you could include anytime. However, if you wanna be nice, you would use qt win ifdefs around just in case, but then it is getting uglier. :)
But yes, provided those drawbacks are not real problems, that also works.
-
wrote on 14 Sept 2013, 04:48 last edited by
[quote author="AcerExtensa" date="1355825116"]#define NOMINMAX before including windows.h header. This is only way at the moment...[/quote]
Hi
i had the same problem and got it working by following your suggestion.
thx. -
wrote on 30 Aug 2014, 14:12 last edited by
This thread helped me out with this issue. THANK YOU.
-
wrote on 10 Sept 2014, 11:12 last edited by
Hi,
I have the same problem, but without an include of windows.h. So I can not enter a define before it and including
DEFINES += NOMINMAX
in the pro-file did'nt worked either.
Any more ideas? -
wrote on 11 Sept 2014, 22:58 last edited by
Hi,
since I started the project I had to reinstall windows and so qt creator. Originaly i used mingw. Now I also installed mingw, but somehow the installation was not compleat and qt creator used msvc instead. After swiching back to mingw I got rid of the error. So it's solved for me, but others might have the same problem.
Dimitri
-
#define NOMINMAX before including windows.h header. This is only way at the moment...
wrote on 17 Jul 2015, 06:39 last edited by@AcerExtensa said:
#define NOMINMAX before including windows.h header. This is only way at the moment...
This worked to me for Qt5.5 VS2010