[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: include path problems, or cons vs. make incompatability?

From: Steven Knight
Subject: Re: include path problems, or cons vs. make incompatability?
Date: Fri, 23 Feb 2001 15:35:46 -0600 (CST)

On Fri, 23 Feb 2001, Brian O'Keefe wrote:
> So, does cons work differently than make in this respect, or do I just have 
> cons set up incorrectly? Here is the output from my cons attempt:

You need to specify CPPPATH in the construction environment to tell Cons
which directories to search and, by extension, what -I options to add to
compile lines.  If you haven't done this, then Cons isn't set up to
do what you want.

> gcc -D_POSIX_SOURCE -DUSE_INTTYPES -DNO_T_TYPES -Iexport/linux/include 
> -I~/src/dirA -c export/linux/src/dirA/rpc/myfile.c -o 
> export/linux/src/dirA/rpc/myfile.o
> In file included from /usr/include/rpc/netdb.h:30,
>                   from export/linux/src/dirA/rpc/myfile.c:65:
> /usr/include/rpc/netdb.h:121: parse error blah blah blah
> and then the rest are parsing errors within /usr/include/rpc/netdb.h due to 
> myfile.c not finding what it expects to find. You can see that it is 
> looking in /usr/include/rpc/netdb.h rather than the desired 
> ...../src/dirA/rpc/netdb.h.
> Any ideas? Do I just have my include path wrong? The first of the two -I 
> paths shown in the above output is defined in my top level Construct file, 
> and the second -I path is defined in my Conscript file.

Which Construct/Conscript file they're defined in shouldn't matter.
What matters is CPPPATH.

The other thing that occurs to me is whether gcc knows how to expand
the '~' in your '-I~/src/dirA' argument above.  Unless I'm really out
of date, no shell that I know of will reach in and expand a ~ inside an
argument like that.  Cons certainly won't.  I bet it's getting passed
through to gcc, and I doubt that gcc handles that expansion, either.
You might have better luck explicitly using $ENV{HOME} instead of '~' in
your Construct/Conscript files.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]