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. QT unable to find header file
Forum Updated to NodeBB v4.3 + New Features

QT unable to find header file

Scheduled Pinned Locked Moved Solved General and Desktop
uimainwindow.hheaderscompile-errorrename files
3 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.
  • D Offline
    D Offline
    daredevil
    wrote on 18 Feb 2019, 14:52 last edited by
    #1

    Hello everyone,

    I am having an issue with a QT project. I have named all headers files *.hpp. Another developer I am working with added a module to the project using *.h for the header file. I removed the file from the project renamed it and added the file under the new name file.hpp to the project. I changed the implementation file to use the new header in the format file.hpp. When I attempt to compile the project I get an error stating that "file.h: No such file or directory". The error appears in the ui_mainwindow.h file.

    I am currently resolving this issue by changing the name of the #include file from *.h to *.hpp and saving but, each time I build the project the issue needs to be resolved again. I have checked my project.pro file and the names of headers are all correct. Can anyone help me resolve this issue?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 18 Feb 2019, 16:12 last edited by
      #2

      Did you re-run qmake after your changes?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      4
      • D Offline
        D Offline
        daredevil
        wrote on 18 Feb 2019, 17:22 last edited by
        #3

        Thanks VRonin,

        Your solution resolved the issue. Kind of kicking myself for not thinking about that.

        1 Reply Last reply
        0

        3/3

        18 Feb 2019, 17:22

        • Login

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