Mail Archives: djgpp/2001/06/19/07:59:50
On Mon, 18 Jun 2001, Adam Majer wrote:
> > gcc -c -I"..\include;..\include\gl" api_arrayelt.c
>
> This is what I've been using with Borland's free compiler for Win32 and
> it worked for a long time like this...
But gcc isn't Borland's compiler, so what worked for Borland might not
work for gcc.
It could have ``worked'' because gcc never actually needed to look into
one of these directories.
Also, since your original message said that the above didn't work at all
in a Makefile, I wonder what does ``work'' mean at all.
> > Btw, does -I really accept multiple directories like that? As far as
> > I can tell from GCC docs, it can only accept a single directory. So
> > what you really should do is modify the command like this:
> >
> > gcc -c -I..\include -I..\include\gl api_arrayelt.c
>
> Apparently DJGPP wants directories like above and in quotation marks :)
If you don't use the semi-colon (or other characters special to the shell
or to Make), then you don't need any quotes.
> For instance, I just noticed that if you compile
>
> gcc my_dir\file.c
>
> and file has
>
> #include "local_include.h"
>
> where local_include.h is in the . directory, you must specify -I".\" as
> otherwise the compiler will switch directory to my_dir and not find the
> local_include.h Don't know if that is the way it's suppose to be...
Yes, that's how it is supposed to work. When the compiler sees
"local_include.h", it searches in the directory where the source file
lives.
- Raw text -