precompiled headers and -I- resp. iquote
Ralf Wildenhues
Ralf.Wildenhues@gmx.de
Tue Jan 18 23:41:00 GMT 2005
* Mike Stump wrote on Tue, Jan 18, 2005 at 11:36:57PM CET:
> On Jan 18, 2005, at 2:05 PM, Ralf Wildenhues wrote:
> >
> >Say I have two precompiled headers for ./foo.h,
> > .libs/pic/foo.h.gch
> >with -fPIC -DPIC and
> > .libs/nopic/foo.h.gch
> >without.
> >
> >I do not see a way of using them for ./bar.c
>
> mkdir .libs/foo.h.gch
> cc foo.h -o .libs/foo.h.gch/nopic
> cc -fPIC foo.h -o .libs/foo.h.gch/pic
>
> cc -I.libs bar.c
cc -H -I.libs bar.c
. foo.h
cc -H -I.libs -I- bar.c
cc1: note: obsolete option -I- used, please use -iquote instead
! .libs/foo.h.gch/nopic
> ? I am sure I am missing something trivial and obvious, but I just
> don't know what it is.
Oh, that might just be me. But in your example above, gcc does not make
use of the precompiled headers.
Sure, I could move foo.h away (require the user to do a different
setup). I'd like to know if I have to.
Thanks,
Ralf
More information about the Gcc
mailing list