Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Incorrect include path in build.ninja
Forum Updated to NodeBB v4.3 + New Features

Incorrect include path in build.ninja

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 474 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
    Poldi
    wrote on 7 Nov 2023, 01:29 last edited by
    #1

    I'm running Qt Creator V11.03 on Ubuntu 22.04.3 LTS and have found the following issue with Ninja as the CMake generator.

    I am building a third party app that I have previosuly built with Qt Creator V6 without any issues and I can also build the project with make from the command line, but the build.ninja file created with Qt Creator V11 generaes the incorrect (Qt) includes.

    ++++ Example ++++++
    build src/CMakeFiles/strawberry_lib.dir/core/application.cpp.o: CXX_COMPILER__strawberry_lib_Debug /home/poldi/QtProjects/mystrawberry/src/core/application.cpp || cmake_object_order_depends_target_strawberry_lib
    DEFINES = -DBOOST_BIND_NO_PLACEHOLDERS -DKDSINGLEAPPLICATION_STATIC_BUILD -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_SQL_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB
    DEP_FILE = src/CMakeFiles/strawberry_lib.dir/core/application.cpp.o.d
    FLAGS = -DQT_QML_DEBUG -g -std=c++17 -Wall -Wextra -Wpedantic -Wunused -Wshadow -Wundef -Wuninitialized -Wredundant-decls -Wcast-align -Winit-self -Wmissing-include-dirs -Wmissing-declarations -Wstrict-overflow=2 -Wunused-parameter -Wformat=2 -Wdisabled-optimization -Woverloaded-virtual -Wold-style-cast -fPIC -std=gnu++17
    INCLUDES = -I/home/poldi/QtProjects/mystrawberry -I/home/poldi/QtProjects/build-mystrawberry-Desktop-Debug -I/home/poldi/QtProjects/build-mystrawberry-Desktop-Debug/src -I/home/poldi/QtProjects/mystrawberry/src -I/home/poldi/QtProjects/mystrawberry/ext/libstrawberry-common -I/home/poldi/QtProjects/mystrawberry/ext/libstrawberry-tagreader -I/home/poldi/QtProjects/build-mystrawberry-Desktop-Debug/ext/libstrawberry-tagreader -I/home/poldi/QtProjects/mystrawberry/3rdparty/kdsingleapplication/KDSingleApplication/src -I/home/poldi/QtProjects/mystrawberry/3rdparty/kdsingleapplication -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui/6.2.4 -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui/6.2.4/QtGui -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore/6.2.4 -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore/6.2.4/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6/QtDBus/6.2.4 -isystem /usr/include/x86_64-linux-gnu/qt6/QtDBus/6.2.4/QtDBus -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/orc-0.4 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/gpod-1.0 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 -isystem /usr/include/libusb-1.0 -isystem /usr/include/x86_64-linux-gnu/qt6/QtCore -isystem /usr/include/x86_64-linux-gnu/qt6 -isystem /usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt6/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt6/QtGui -isystem /usr/include/x86_64-linux-gnu/qt6/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt6/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt6/QtSql -isystem /usr/include/x86_64-linux-gnu/qt6/QtDBus
    OBJECT_DIR = src/CMakeFiles/strawberry_lib.dir
    OBJECT_FILE_DIR = src/CMakeFiles/strawberry_lib.dir/core
    +++++++
    This include points to /usr/include/x86_64-linux-gnu/qt6/QtGui/6.2.4, when the correct path is /usr/include/x86_64-linux-gnu/qt6/QtGui

    I'm not sure where this path is set and would appreciate any pointers

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Poldi
      wrote on 8 Nov 2023, 01:59 last edited by
      #2

      I think it was a combination of the Qt install in my user account and the Qt installation by Ubuntu.
      Fixed by specifying the Qt install location as the CMAKE_PREFIX_PATH

      1 Reply Last reply
      0

      1/2

      7 Nov 2023, 01:29

      • Login

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