Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. qtcreator does not find my headers
Qt 6.12 LTS is out! See what's new in the release blog

qtcreator does not find my headers

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 2 Posters 3.4k 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.
  • J Offline
    J Offline
    jdudouet
    wrote on last edited by
    #1

    Hello,

    I am working on a C++ library project on MacOS using qtcreator. I am using the import of existing project not using Qt.

    My library project is composed of a big numbers of sub directories (and sub sub directories), containing each cpp and headers files. Before, using qtcreator 4, the .includes file of my project was correctly filled automatically to contains all the subdirectories and the project was correctly finding all my headers.

    No, I moved on qtcreator 10, this does not work anymore. My .includes file stay empty and none of my headers are found. Adding them one by one is clearly not a good solution.

    Do you have any idea of why this is happening like this ?

    Thanks in advance

    Jérémie

    jsulmJ 1 Reply Last reply
    0
    • J jdudouet

      Hello,

      I am working on a C++ library project on MacOS using qtcreator. I am using the import of existing project not using Qt.

      My library project is composed of a big numbers of sub directories (and sub sub directories), containing each cpp and headers files. Before, using qtcreator 4, the .includes file of my project was correctly filled automatically to contains all the subdirectories and the project was correctly finding all my headers.

      No, I moved on qtcreator 10, this does not work anymore. My .includes file stay empty and none of my headers are found. Adding them one by one is clearly not a good solution.

      Do you have any idea of why this is happening like this ?

      Thanks in advance

      Jérémie

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @jdudouet You did not mention the build system you're using (CMake, QMake, ...).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • jsulmJ jsulm

        @jdudouet You did not mention the build system you're using (CMake, QMake, ...).

        J Offline
        J Offline
        jdudouet
        wrote on last edited by
        #3

        @jsulm Sorry, I am using CMake, but I don't have the feeling that using external project, my CMake files are really used

        jsulmJ 1 Reply Last reply
        0
        • J jdudouet

          @jsulm Sorry, I am using CMake, but I don't have the feeling that using external project, my CMake files are really used

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @jdudouet It is not really clear what you mean. Are you trying to open a CMake based project in QtCreator and build it? Or are you trying to add a library to your project? If it is the later you need to specify the location of the library header files in your project if QtCreator did not do that.
          Can you please explain what exactly are you doing?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          0
          • jsulmJ jsulm

            @jdudouet It is not really clear what you mean. Are you trying to open a CMake based project in QtCreator and build it? Or are you trying to add a library to your project? If it is the later you need to specify the location of the library header files in your project if QtCreator did not do that.
            Can you please explain what exactly are you doing?

            J Offline
            J Offline
            jdudouet
            wrote on last edited by
            #5

            @jsulm I am working on a C++ library based on CMake for the compilation: https://gitlab.in2p3.fr/ip2i_gamma/agapro

            I am using qtcreator as an IDE to benefits from all the powerful tools for navigating in the code and having the code analysis and debugging. So for this I create a new project using "import an existing project".

            Once I select all the files of my project, I can correctly edit all my files, but I have plenty or errrors saying that my headers (part of the project) are not found by clangd.

            When I was using qtcreator 4, at the project creation, my file myproject.includes was automatically fill with all the different subfolders of my project. Thanks to this, the headers were correctly found, but now, this .includes file is no more filled.

            Is it clearer ?

            jsulmJ 1 Reply Last reply
            0
            • J jdudouet

              @jsulm I am working on a C++ library based on CMake for the compilation: https://gitlab.in2p3.fr/ip2i_gamma/agapro

              I am using qtcreator as an IDE to benefits from all the powerful tools for navigating in the code and having the code analysis and debugging. So for this I create a new project using "import an existing project".

              Once I select all the files of my project, I can correctly edit all my files, but I have plenty or errrors saying that my headers (part of the project) are not found by clangd.

              When I was using qtcreator 4, at the project creation, my file myproject.includes was automatically fill with all the different subfolders of my project. Thanks to this, the headers were correctly found, but now, this .includes file is no more filled.

              Is it clearer ?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @jdudouet said in qtcreator does not find my headers:

              So for this I create a new project using "import an existing project".

              Why? If the project you're importing uses CMake you simply open it directly in QtCreator like any other CMake based project.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              J 1 Reply Last reply
              0
              • jsulmJ jsulm

                @jdudouet said in qtcreator does not find my headers:

                So for this I create a new project using "import an existing project".

                Why? If the project you're importing uses CMake you simply open it directly in QtCreator like any other CMake based project.

                J Offline
                J Offline
                jdudouet
                wrote on last edited by
                #7

                @jsulm no idea... I alwas done like this :( So what am I supposed to do, open a project and selecting the main CMakeList.txt ?

                jsulmJ 1 Reply Last reply
                0
                • J jdudouet

                  @jsulm no idea... I alwas done like this :( So what am I supposed to do, open a project and selecting the main CMakeList.txt ?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @jdudouet said in qtcreator does not find my headers:

                  open a project and selecting the main CMakeList.txt ?

                  yes

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  J 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @jdudouet said in qtcreator does not find my headers:

                    open a project and selecting the main CMakeList.txt ?

                    yes

                    J Offline
                    J Offline
                    jdudouet
                    wrote on last edited by
                    #9

                    @jsulm sorry for that, it seems indeed much more appropriate :)

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt
                    • Unsolved