[Interest] qt5 porting questions
Till Oliver Knoll
till.oliver.knoll at gmail.com
Fri Jan 25 15:09:46 CET 2013
Am 25.01.2013 um 12:11 schrieb Mojmír Svoboda <Mojmir.Svoboda at warhorsestudios.cz>:
> ...
> 3) i wonder how to include windows headers correctly. i was getting
> strange errors with minmax macros from windows.h that was included
> somewhere from Qt.
Can't remember the details of that one, but I think it has to do with that somewhere within the windows.h inclusion chain some weird MIN and MAX macros are defined, which then collide with the std::min and std::max STL functions used in successive #includes (or any other "min/max" function).
So either try to import/re-arrange the <window.h> header (or any other non-Qt header that implicitly includes it) last in your own sources (assuming that you don't use min/max yourself) or, IIRC, #define a macro like NO_MINMAX_DEF (?) before including <windows.h> (I think that this is what Qt does itself in the win32 specific implementation).
Search with google/the Qt archives. This is an issue since I can think of developing on Windows. ;)
Cheers,
Oliver
More information about the Interest
mailing list