MACOS 15.3, Qt 6.8.1 - error: no such file or directory: 'QtWidgets' clang++: error: no such file or directory: 'QtWidgets' make
-
Hi,
I have been developing code for some years with no substantial issue, until now.
I am using a Mac Book Pro M3 running 15.3 (Sonoma) and Xocde 15.
I recompiled a previously working application (actually it compiles fine on Linux and Win10 platforms).
I now get an error: error: no such file or directory: 'QtWidgets' clang++: error: no such file or directory: 'QtWidgets' make
I have used both the Qt maintenance tool to install Qt, and recently deleted all of that and installed homebrew Qt 6.8.2 and Qt-creator 15.0.1 to teset if it was something I'd not included from the distribution.
Product: Qt Creator 15.0.1
Based on: Qt 6.8.1 (Clang 15.0 (Apple), arm64)
Built on: Jan 22 2025 13:40:52
From revision: 0855a2e14dI have the Qt bin included in the .zshrc PATH variable:
export PATH=":/opt/homebrew/Cellar/qt/6.8.2/bin:$PATH"
export PATH=":/opt/homebrew/Cellar/qt/6.8.2/lib:$PATH"Any ideas what I am doing wrong?
Phil
-
Please post the command line which produces the error. Also make sure the headers are in the location where the compiler expects them.
-
Good morning!
How have you re-compiled the application? Inside Qt Creator, or by running ninja / cmake in its build tree? Please try from Creator. Check whether the compile kit s the right one and the Qt version is pointing to the qmake executable in the 6.8.1 installation tree. -
@Axel-Spoerl Hi,
Thanks I've been using QtCreator, so just button clicking. The application has been compiled successfully a week before I was obliged to upgrade to v15.3 macos . So I am suspicious of that upgrade. I tried searching on the Mac support, but nothing there.
I'll check the paths are seen and the Qt version with qmake. Thanks for the suggestions (also to Christian Ehlicher).
Phil
-
You can also try to clean the build directory with Build->Clean or just deleting the build tree manually. I’ve had such failures after updates before and they can have all kinds of reasons.