Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Made the mistake of updating Xcode
I made the mistake of updating XCode today. (I knew better, but I selected "Update All".)
As a result, I am receiving a error "TargetConditionals.h file not found" when I compile my application.
From previous experience, I know that I need to update the .pro file with "QMAKE_MAC_SDK = macosx10.13". However, that is not resolving the problem. Has anyone sound a solution to this issue?
patrik08 last edited by patrik08
its not need after xcode7 to write sdk version.. ***
QMAKE_MAC_SDK is old..
in time wo you compile you see min. 10.11 or 10.. but sierra can use... http://doc.qt.io/qt-5/osx.html
google search MACOS_DEPLOYMENT_TARGET
I added "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13" to my .pro file and I still receive the same error.
Shadev last edited by
I just had the same problem. Clean build did not help, had to do complete wipe = delete the build directory and then rebuild get rid of this error.
I just deleted my build directory and I still have the error when I recompile. I also tried to compile an example project and have the same error.
I just reverted back to an older version of Xcode. This solved my problem. Not a very good solution, but I am up and running again.
JyrkiYliNokari last edited by
Same problem here. Tried grepping the whole /opt/Qt/5.9 hierarchy against MacOSX10.12 but nothing. The -spec is macosx and ../mkspec hierarchy seems to set things right.
I solved this by adding a symbolic link macosx10.12 -> macosx
(Sorry I don't remember the actual file- and directorynames as I do not have my mac on hand)
Can someone point me to from where the MacOSX10.12 comes from -- apparently runtime detected
Have a look at the comments of this ticket:
I think it'd help.
Bofei last edited by
Adding this line :
QMAKE_MAC_SDK = macosx10.13
in the qdevice.pri file (/clang_64/mkspecs of QT).
cmmin last edited by
Hello, just had exactly the same problem. What worked for me was to delete all the build directory and recompile everything.
Hope this helps others.
Rochus last edited by
Found the following with Qt5.9.1 on OS X 10.11.6: QMAKE_MAC_SDK is only useful für 32bit builds; when building for 64bit instead add to the pro file:
INCLUDEPATH += /usr/include
QMAKE_LFLAGS += -F/System/Library/Frameworks -L/usr/lib
The first line is necessary because of TargetConditionals.h.
The second line is necessary because of DiskArbitration framework and c++ library not found. After these tricks the 64bit application compiles and runs.
bryanmeyer last edited by
This bug report indeed was helpful:
Specifically, Thiago indicated to:
- Remove .qmake.cache, .qmake.stash and all other cache files and then try again, starting from configure.
- If you updated Xcode, then the path to the headers changed and qmake needs to know to search again for them.
In other words, "Clean Project" or "Rebuild Project" is not enough. You need to either delete every single (hidden) file from the build directories or more easily just trash the build directories and then rebuild.
You'll then get the key message:
Info: creating stash file /Users/XXX/Qtprojects/build-TestCompileErrors-Desktop_Qt_5_11_1_clang_64bit-Debug/.qmake.stash
And your project will run!