Re: compiler could not find include *.h file

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

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux