QT_LARGEFILE_SUPPORT macro redifinition issue with Qt4.8.5
-
It seems that QT_LARGEFILE_SUPPORT is defined in qconfig.h now:
@// Compile time features
#define QT_ARCH_WINDOWS
#define QT_LARGEFILE_SUPPORT 64
#if defined(QT_GRAPHICSSYSTEM_RASTER) && defined(QT_NO_GRAPHICSSYSTEM_RASTER)undef QT_GRAPHICSSYSTEM_RASTER
#elif !defined(QT_GRAPHICSSYSTEM_RASTER)
define QT_GRAPHICSSYSTEM_RASTER
#endif@
I've removed QT_LARGEFILE_SUPPORT from the preprocessor settings of each of my generated moc files. Now, the warning disappears. I've also removed it from the ItemDefinitionGroups in the VS project file, so that the macro will not be set again for new moc files.
-
As the QT_LARGEFILE_SUPPORT preprocessor definition has been and will be automatically added to projects by the current version of Qt VS Addin (1.1.11), it was easier for me to change qconfig.h to
@#if !defined(QT_LARGEFILE_SUPPORT)
define QT_LARGEFILE_SUPPORT 64
#endif@
I searched the whole qt folder for QT_LARGEFILE_SUPPORT, and it is always being checked with an #ifdef, it doesn't seem to matter whether it's 1 or 64.
-
Solution from FloGe worked great for me. Thanks for the tip.