Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Build Problem on Mac (g++-4.2: No such file or directory)
I'm very new in developing in qt. So i have written a desktop application but after i updated Xcode the code don't get build.
If i want to compile its keeps on writing: g++-4.2: No such file or directory
I have read here in the forum about solving this problem but couldn't fix it.
So my qmake command looks like this:
qmake /Users/alikara/Dropbox/Seminararbeit/CZE-Projekt/CZE-Projekt.pro -r CONFIG+=release -spec macx-gcc
It means i added -spec macx-gcc ass a additional argument but it doesn't helped.
So i tried to change the toolchain to clang but it doesn't helped too.
So i tried to symlink g++/gcc to g++-4.2/gcc-4.2 but don't found gcc-4.2 in /usr/bin/
My /usr/bin/ looks like this:
lrwxr-xr-x 1 root wheel 12 25 Jan 08:00 g++ -> llvm-g++-4.2
-r-xr-xr-x 1 root wheel 101670 3 Nov 22:56 gatherheaderdoc
lrwxr-xr-x 1 root wheel 12 25 Jan 08:00 gcc -> llvm-gcc-4.2
lrwxr-xr-x 1 root admin 32 25 Jan 08:00 llvm-cpp-4.2 -> ../llvm-gcc-4.2/bin/llvm-cpp-4.2
lrwxr-xr-x 1 root admin 32 25 Jan 08:00 llvm-g++ -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x 1 root admin 32 25 Jan 08:00 llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x 1 root admin 32 25 Jan 08:00 llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x 1 root admin 32 25 Jan 08:00 llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
So please can someone help out?
Did you rerun qmake after making those changes?
Yes i reruned it and it still throws the same error...
Please try the Qt Creator 2.4.1 release from today. It should fix the issue.
thanks. the update fixed the issue :)