This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newbie looking to add include files



It's far more preferable to do "g++ -I/usr/include/myfiles" in your
Makefile, than it is to put that kind of cruft in the GCC build itself.

I whole-heartedly agree, and about as quick as I asked, I realized that if I simply do:

#include <myfiles/myfile.h>

that I am, therefore, specifying the path as I had intended to. Duh! That allows me to put my headers into their own subdirectories and then refer to them in a consistent manner.

But, one other question, what if you have *alot* of directories in your include search path, and it's something you *need* to put on the g++ line? Don't they get kind of long, and therefore, sort of ugly? In Borland, for instance, I think there is another place to specify additional search paths (globally) so that each one of your projects benefits from the redirection. I would like to have my make files somewhat generic and not have to specify include paths in that manner, should they become unweildy. Is my thinking wrong about it?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]