This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: precompiled headers and -I- resp. iquote
On Tue, Jan 18, 2005 at 05:58:52PM -0800, Mike Stump wrote:
> On Jan 18, 2005, at 3:05 PM, Ralf Wildenhues wrote:
> >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.
>
> Ah... Curious...
>
> mkdir foo.h.gch
> cc foo.h -o foo.h.gch/nopic
> cc -fPIC foo.h -o foo.h.gch/pic
>
> cc bar.c
>
> ? If you put the headers that you want to compile in include/, you can
> also avoid this problem I think.
Or, put a directory earlier on the search path which includes
foo.h.gch and touch foo.h in that directory.
--
Daniel Jacobowitz