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] Qmake INCLUDEPATH does Not includes sub folders?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qmake INCLUDEPATH does Not includes sub folders?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.9k 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by mrjj
    #1

    Update:
    Reading
    http://www.mingw.org/wiki/includepathhowto
    Its seems that adding all folder is by design (or lack of) and the
    smart flag /folder/** is not supported.
    Also I could use #include "../path/sub path/file.h" but
    its less optimal if you refactor folder structure sometimes.

    Hi
    Trying to get my trace system up and running in Qt.
    it has a folder structure like
    ..\Common\Platform
    Exception
    FileStream
    IpNet
    MultiOS
    String
    Trace
    Types

    Normally I would just add "Platform" to include path (for my current compiler) and any file under
    would be found.

    Seems QMake wants all listed
    like
    INCLUDEPATH += $$PWD/../AllPO/Source/Common/Platform/Trace
    $$PWD/../AllPO/Source/Common/Platform/Types
    ...

    Which is kinda a nightmare as there are sub and sub-sub folders too.

    So am I doing it wrong ?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      We can guess Windows but have no idea what compilers are involved. I am not aware of any compiler that treats include path options recursively.

      Take a look at the actual compiler command generated by qmake and make sure that $PWD is expanding to the place you think it is.

      mrjjM 1 Reply Last reply
      1
      • C ChrisW67

        We can guess Windows but have no idea what compilers are involved. I am not aware of any compiler that treats include path options recursively.

        Take a look at the actual compiler command generated by qmake and make sure that $PWD is expanding to the place you think it is.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        @ChrisW67
        Sorry, forgot to mention platform. (facepalm)
        win 7, mingw

        Yes I did use $PWD and added each folder.
        Just wanted an easier way, but that not possible.

        C++ builder looks in sub folder for includes pr default/pr option.

        I assume $PWD is always where the .pro file is.

        Thank you

        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