By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

add a directory location for compilation

P: n/a
Hi everyone, my question is probably trivial but I couldn't find a way
to do it. Is there a way to tell the compiler about a directory where
it has to look for some files? For example, I'm trying to use Qt to
design a graphic user interface and in my system the Qt files are
under /usr/include/Qt4 instead of /usr/include. I could easily change
the location in the produced header files but I think this is a brute
force approach and maybe adding another directory to the compiler is
something easy.

Thanks for your help.



Aug 5 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sun, 05 Aug 2007 22:09:52 +0000, aaragon wrote:
Hi everyone, my question is probably trivial but I couldn't find a way
to do it. Is there a way to tell the compiler about a directory where it
has to look for some files? For example, I'm trying to use Qt to design
a graphic user interface and in my system the Qt files are under
/usr/include/Qt4 instead of /usr/include. I could easily change the
location in the produced header files but I think this is a brute force
approach and maybe adding another directory to the compiler is something
easy.
#include <// includes headers from a directory listed with -i dir

#include "" // includes headers at an absolute or relative directory

For Qt4 use the qmake-qt4 project file (.pro) to modify the common macro
directory locations.
qmake-qt4 -project # creates a project file

vi *.pro # edits the project file that creates Makefile

qmake-qt4 # creates the Makefile

make # builds the app

by default the project file is the directory name followed by .pro



Aug 5 '07 #2

P: n/a
On Aug 5, 5:40 pm, Just me <noemailt...@somedomain.comwrote:
On Sun, 05 Aug 2007 22:09:52 +0000, aaragon wrote:
Hi everyone, my question is probably trivial but I couldn't find a way
to do it. Is there a way to tell the compiler about a directory where it
has to look for some files? For example, I'm trying to use Qt to design
a graphic user interface and in my system the Qt files are under
/usr/include/Qt4 instead of /usr/include. I could easily change the
location in the produced header files but I think this is a brute force
approach and maybe adding another directory to the compiler is something
easy.

#include <// includes headers from a directory listed with -i dir

#include "" // includes headers at an absolute or relative directory

For Qt4 use the qmake-qt4 project file (.pro) to modify the common macro
directory locations.

qmake-qt4 -project # creates a project file

vi *.pro # edits the project file that creates Makefile

qmake-qt4 # creates the Makefile

make # builds the app

by default the project file is the directory name followed by .pro
Thank you so much, I just changed the .pro file and included the right
path.

Aug 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.