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. [SOLVED] QT creator can't find added headers when building
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QT creator can't find added headers when building

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • W Offline
    W Offline
    wowy
    wrote on last edited by wowy
    #1

    Hi,
    In my project i must add already existing .h, .cpp and .nsmap files.
    I right clicked on my project name>add existing file, the files are in the project and are in the .pro file too. (the files are not in the project folder on the disk (in /home/name/appli, they are in a folder on the desktop).

    I clean my project and then try to build it but i have errors like :
    /home/spi/ChargePoint/main.cpp:3: soapH.h: No such file or directory

    Did i miss a manipulation when adding the files or maybe qt creator don't like when the files are so far on the hard drive, or another thing ?

    1 Reply Last reply
    0
    • momoM Offline
      momoM Offline
      momo
      wrote on last edited by
      #2

      AFAIK, If the .h files are not in the same folder as the .cpp files that need them, then you need to tell the project where to find the .h files. To do this, open your .pro file and adding something like this:

      INCLUDEPATH += \
          /home/name/appli \
          /desktopfolder/myhfiles \
          <additional paths to other h files>
      

      That should do the trick.

      Not all those who wander are lost.
      Deep roots are not killed by the frost.

      1 Reply Last reply
      1
      • W Offline
        W Offline
        wowy
        wrote on last edited by wowy
        #3

        Ok, i will try, thank you !

        EDIT: Seems to work.

        momoM 1 Reply Last reply
        0
        • W wowy

          Ok, i will try, thank you !

          EDIT: Seems to work.

          momoM Offline
          momoM Offline
          momo
          wrote on last edited by
          #4

          Glad to have helped!
          If your problem is solved, you should edit the original post (only you can do this) and add the [SOLVED] prefix to the thread title so that is shows up as SOLVED in the table of contents, e.g. change the title of your post to be:
          [SOLVED] QT creator can't find added headers when building

          Not all those who wander are lost.
          Deep roots are not killed by the frost.

          1 Reply Last reply
          1

          • Login

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