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?

  • Moderators

    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.

  • Moderators

    did you rerun qmake before starting the compilation again?

  • Yes, and I've deleted the output directory also.

  • Lifetime Qt Champion


    Not all compilers provides the same set of warnings. IIRC, the hides overload warning is clang specific.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.