Important: Please read the Qt Code of Conduct -

OSX clang 64-bit release kit - qmake always generates "this project is using private headers"

  • I've been having some odd issues on OSX and trying to track them down, and I just noticed that when I run qmake I get the following warnings:

    11:41:52: Running steps for project testApp...
    11:41:52: Starting: "/Users/hans/Qt5.7.0/5.7/clang_64/bin/qmake" /Users/hans/Desktop/testApp/testApp/ -r -spec macx-clang CONFIG+=x86_64 CONFIG+=qtquickcompiler
    Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
    Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
    Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
    11:41:52: The process "/Users/hans/Qt5.7.0/5.7/clang_64/bin/qmake" exited normally.
    11:41:52: Elapsed time: 00:00.

    I do not get these warnings with my debug qmake call. I have never added anything related to private headers, and I even went through and make sure I used <QQuickItem> style of includes instead of <qquickitem.h> everywhere in that was the issue.

    There's nothing in my .pro that includes or mentions anything private, so I am a loss as to know why this message keeps coming up?

    Here's my .pro

    TEMPLATE = app
    QT += qml quick
    # Windows, OSX, and linux use webengine
    win32 | macx | unix {
    	QT += webengine
    CONFIG += c++11
    SOURCES += main.cpp \
            IMLogger.cpp \
            IMManager.cpp \
            IMOptions.cpp \
            plugins/FalsePlugin_Debug/FalsePlugin_Debug.cpp \
            plugins/FalsePlugin_Diagnostics/FalsePlugin_Diagnostics.cpp \
            plugins/FalsePlugin_Enrollment/FalsePlugin_Enrollment.cpp \
            plugins/FalsePlugin_Profiles/FalsePlugin_Profiles.cpp \
    HEADERS +=  \
            IMLogger.h \
            IMManager.h \
            IMOptions.h \
            IIMPluginHost.h \
            IMPlugins.h \
            IMCmdLineParser.h \
            plugins/FalsePlugin_Debug/FalsePlugin_Debug.h \
            plugins/FalsePlugin_Diagnostics/FalsePlugin_Diagnostics.h \
            plugins/FalsePlugin_Enrollment/FalsePlugin_Enrollment.h \
            plugins/FalsePlugin_Profiles/FalsePlugin_Profiles.h \
    RESOURCES += qml.qrc
    # Additional import path used to resolve QML modules in Qt Creator's code model
    # The application version
    VERSION = 0.1
    # Define the preprocessor macro to get the application version in our application.

    I google for this but couldn't see any reason why this would be affecting me...

    BTW - I get the same warnings if I build release versions of the example Qt applications that shipped with Qt 5.7.

    Thanks :)

  • Lifetime Qt Champion


    What if you remove the qtquickcompiler from CONFIG ?

  • That makes those warning disappear.

    Does that indicate a bug in Qt or some bad in my Qml?

  • Lifetime Qt Champion

    Neither, it's a known limitation explained here.

Log in to reply