Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. What is the syntax of ‘INCPATH’ in Qt Makefile?

What is the syntax of ‘INCPATH’ in Qt Makefile?

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 3 Posters 9.9k 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
    justforfun
    wrote on last edited by
    #1

    This is a simple question. Like below INCPATH of my Makefile, why there is '-I.' there? And why several '-I. -I.' are put there together? What does this mean?

    INCPATH = -I/targets/FREMANTLE_ARMEL/usr/share/qt4/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/usr/include/QtCore -I/targets/FREMANTLE_ARMEL/usr/include/QtGui -I/targets/FREMANTLE_ARMEL/usr/include -I. -I.

    Thank you!

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pushpendrak
      wrote on last edited by
      #2

      INCPATH defines the path oh Header files to be included in the Environment

      -I means i don't know, i m windows programmer

      PushpendraK

      1 Reply Last reply
      0
      • J Offline
        J Offline
        justforfun
        wrote on last edited by
        #3

        [quote author="pushpendrak" date="1285572429"]INCPATH defines the path oh Header files to be included in the Environment

        -I means i don't know, i m windows programmer[/quote]

        Thank you! pushpendrak

        I know the original meaning of '-I' like you mentioned. But I don't know the meaning of '-I. -I.' or why '-I.' is repeated so many times.

        As for '-I.' itself, I guess it means 'include the current path', am I right?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          Makefile generated from .pro-file takes includepaths, librarypaths and other settings from different places (your .pro, maybe included .pro or .pri, makespecs and so on) and it can be dublicated across this different sources.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            justforfun
            wrote on last edited by
            #5

            [quote author="Denis Kormalev" date="1285574814"]Makefile generated from .pro-file takes includepaths, librarypaths and other settings from different places (your .pro, maybe included .pro or .pri, makespecs and so on) and it can be dublicated across this different sources.[/quote]

            Thank you! Denis

            Now I have better understanding of INCPATH. But could you please describe a little bit more about the details? I still cannot understand why '-I. -I.' exists. Please forgive my stupid, I am a newbie.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DenisKormalev
              wrote on last edited by
              #6

              Maybe you just have .pro file with
              @
              INCLUDEPAH += .
              ........
              include(someprifile.pri)
              @
              and have someprifile.pri with
              @
              INCLUDEPAH += .
              @

              Or second "." is included from some else place.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pushpendrak
                wrote on last edited by
                #7

                i have gone through it and googled, i found out that this -I. indicate the current directory of project.

                PushpendraK

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  justforfun
                  wrote on last edited by
                  #8

                  [quote author="Denis Kormalev" date="1285579220"]Maybe you just have .pro file with
                  @
                  INCLUDEPAH += .
                  ........
                  include(someprifile.pri)
                  @
                  and have someprifile.pri with
                  @
                  INCLUDEPAH += .
                  @

                  Or second "." is included from some else place.[/quote]

                  Your opinion is right. I tried to remove some duplicated '-I.' and still I can compile to the same result. That means the duplicated '-I.' is not necessary and could be generated by the qmake process.

                  Also thanks to those who provided your idea here!

                  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