Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. MACOS 15.3, Qt 6.8.1 - error: no such file or directory: 'QtWidgets' clang++: error: no such file or directory: 'QtWidgets' make
Forum Update on Monday, May 27th 2025

MACOS 15.3, Qt 6.8.1 - error: no such file or directory: 'QtWidgets' clang++: error: no such file or directory: 'QtWidgets' make

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 217 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PhilC 0
    wrote on 27 Feb 2025, 13:58 last edited by
    #1

    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: 0855a2e14d

    I 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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 27 Feb 2025, 14:30 last edited by
      #2

      Please post the command line which produces the error. Also make sure the headers are in the location where the compiler expects them.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Axel Spoerl
        Moderators
        wrote on 28 Feb 2025, 06:58 last edited by
        #3

        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.

        Software Engineer
        The Qt Company, Oslo

        P 1 Reply Last reply 28 Feb 2025, 15:36
        0
        • A Axel Spoerl
          28 Feb 2025, 06:58

          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.

          P Offline
          P Offline
          PhilC 0
          wrote on 28 Feb 2025, 15:36 last edited by
          #4

          @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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Axel Spoerl
            Moderators
            wrote on 2 Mar 2025, 18:48 last edited by
            #5

            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.

            Software Engineer
            The Qt Company, Oslo

            1 Reply Last reply
            0

            3/5

            28 Feb 2025, 06:58

            • Login

            • Login or register to search.
            3 out of 5
            • First post
              3/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved