This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compiler could not find include *.h file
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 29 Sep 2008 16:46:02 +0000 (UTC)
- Subject: Re: compiler could not find include *.h file
- References: <200809270956578281987@gmail.com>
Hello,
zqiang320 <zqiang320 <at> gmail.com> writes:
> Makefile.am :
> SUBDIRS = libsbml/src .
> AM_CPPFLAGS = -Isundials/include -Ilibsbml/include
> $ make
> Making all in libsbml/src
> make[1]: Entering directory `/home/internet/mydoc/test_pj/libsbml/src'
> ........
> -I. -Isundials/include -Ilibsbml/include -g -O2 -MT main.o -MD -MP -MF
.deps/main.Tpo -c -o main.o main.c
> In file included from sundials/include/sundials/sundials_nvector.h:50,
> from sundials/include/cvodes/cvodes.h:41,
> from main.c:52:
> sundials/include/sundials/sundials_types.h:50:38: error:
sundials/sundials_config.h: No such
> file or directory
> sundials/sundials_config.h was in directory in sundials/include, why compiler
could not find it by
> AM_CPPFLAGS = -Isundials/include
I see one of two possibilities:
It looks a bit like the relative path is wrong from within the directory the
Makefile.am is in. You could adjust it per Makefile.am, or use something like
AM_CPPFLAGS = -I$(top_builddir)/sundials/include
The other issue could be that you mix up source and build trees, or need header
files from both. In that case also add an include path -I$(srcdir)/... or
-I$(top_srcdir)/...
Hope that helps. This question would have better fit on an automake mailing
list.
Cheers,
Ralf