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. DEPENDPATH in .pro file
Forum Updated to NodeBB v4.3 + New Features

DEPENDPATH in .pro file

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 3.7k 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.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    Hi
    In my .pro file I make reference to a .pri file -
    @
    include (C://SoftwareDevelopment//Shared//CommonUI//ApplicationCode//ASLLog.pri)
    @

    I have also added a DEPENDPATH section
    @
    C://SoftwareDevelopment//Shared//CommonUI//ApplicationCode//Widgets
    @

    The .pri file specifies the files in the Widgets folder to be compiled

    I thought that with this arrangement a change made to a file in the Widgets folder would result in my application compiling this changed file. This does not happen - I have to change a file in my base project to force a compile and then the Widgets file is compiled.

    Have I misunderstood the DEPENDPATH directive ot am I using it incorrectly

    Any advice would be appreciated

    Thanks

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Holly.Deng
      wrote on last edited by
      #2

      DEPENDPATH defines the path of the FILES which needed by your project when building.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        If you want files to be compiled as part of your project, you need to add them as HEADERS and SOURCES

        I have used DEPENDPATH only for referencing libraries that I link to my project. It allows changes to these libraries to be detected, and re-links the project in this case.
        (If the DEPENDPATH has other uses, I don't know about it).

        1 Reply Last reply
        0
        • G Offline
          G Offline
          GrahamL
          wrote on last edited by
          #4

          Hi
          My .pri files adds the to the list of files and headers.
          Editing a file referenced in the .pri file does not result in that file being compiled

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asperamanca
            wrote on last edited by
            #5

            Maybe the files are not found.

            Files and Headers are always searched relative to the position of the .pro-File, NOT the position of the .pri file.
            So if you use relative path names, you need to be aware of that.

            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 Extensions
            • Unsolved