What is the syntax of ‘INCPATH’ in Qt Makefile?
-
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!
-
INCPATH defines the path oh Header files to be included in the Environment
-I means i don't know, i m windows programmer
-
[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?
-
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 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.
-
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.
-
i have gone through it and googled, i found out that this -I. indicate the current directory of project.
-
[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!