Nominate our 2022 Qt Champions!

[solved] precompiled header / MacOS / Qt Creator / C++11

  • In pro file:

    • moc files are created without pch.h, so get compile error on them.
      When additionally specifying:
      CONFIG += precompile_header
    • then C++11 is disabled, and get error even before moc files compilation. Also tried
      CONFIG += c++11 c++0x
      QMAKE_CXXFLAGS += -std=gnu++0x
      QMAKE_CXXFLAGS += -std=c++0x

    How to add precompiled headers with C++11? Is it because of compiler output contains -mmacosx-version-min=10.7 ? So spaghetti options and side effects...

  • Solved - switched back to XCode.

Log in to reply