More warnings on compilation on MinGW or Android
-
When compile for iOS, the XCode compiler shows more warnings than compiling on Windows with MinGW. For exemple, in an inherited class that declare a method that exists in the inherited class, apperas this warning: <method name> hides overloaded virtual function. Or when overrides a method but not includes the override directive, appears this: <method name> overrides a member function but is not marked 'override'.
How can I do to appear these warnings when compile for Windows or Android on windows environment?
-
When compile for iOS, the XCode compiler shows more warnings than compiling on Windows with MinGW. For exemple, in an inherited class that declare a method that exists in the inherited class, apperas this warning: <method name> hides overloaded virtual function. Or when overrides a method but not includes the override directive, appears this: <method name> overrides a member function but is not marked 'override'.
How can I do to appear these warnings when compile for Windows or Android on windows environment?
@lqsa
you can try to add the-Wall
parameter to the compilation flags. -
I've added QMAKE_CXXFLAGS += -Wall at the end of the .pro file, but nothing. I've tried QMAKE_CXXFLAGS += -Wall -Wpedantic also.
@lqsa
did you rerun qmake before starting the compilation again? -
Hi,
Not all compilers provides the same set of warnings. IIRC, the hides overload warning is clang specific.