[Dune] Grid compile error
Agnese, Marco
m.agnese13 at imperial.ac.uk
Wed Jan 29 12:03:54 CET 2014
Hello Christian,
you are right HAVE_ALBERTA evaluates to false but in the Makefile.am (in the folder dune-test/src/) it seems I have all the necessary flags:
SUBDIRS =
noinst_PROGRAMS = dune_test
dune_test_SOURCES = dune_test.cc
dune_test_CPPFLAGS = $(AM_CPPFLAGS) \
$(DUNEMPICPPFLAGS) \
$(UG_CPPFLAGS) \
$(AMIRAMESH_CPPFLAGS) \
$(ALBERTA_CPPFLAGS) \
$(ALUGRID_CPPFLAGS)
dune_test_LDADD = \
$(DUNE_LDFLAGS) $(DUNE_LIBS) \
$(ALUGRID_LDFLAGS) $(ALUGRID_LIBS) \
$(ALBERTA_LDFLAGS) $(ALBERTA_LIBS) \
$(AMIRAMESH_LDFLAGS) $(AMIRAMESH_LIBS) \
$(UG_LDFLAGS) $(UG_LIBS) \
$(DUNEMPILIBS) \
$(LDADD)
dune_test_LDFLAGS = $(AM_LDFLAGS) \
$(DUNEMPILDFLAGS) \
$(UG_LDFLAGS) \
$(AMIRAMESH_LDFLAGS) \
$(ALBERTA_LDFLAGS) \
$(ALUGRID_LDFLAGS) \
$(DUNE_LDFLAGS)
AUTOMAKE_OPTIONS = foreign 1.5
DISTCHECK_CONFIGURE_FLAGS = --with-dune-grid=$(DUNE_GRID_ROOT) CXX="$(CXX)" CC="$(CC)"
include $(top_srcdir)/am/global-rules
I don't know if something is missing, I am novice in DUNE.
Thank you very much for your help,
cheers
Marco
________________________________________
From: Christian Engwer [christian.engwer at uni-muenster.de]
Sent: Tuesday, January 28, 2014 7:26 PM
To: Agnese, Marco; dune at dune-project.org
Subject: Re: [Dune] Grid compile error
Dear Marco,
"Agnese, Marco" <m.agnese13 at imperial.ac.uk> schrieb:
>Hello DUNEers,
>I am getting mad trying to understand this problem.
>
>If I try to compile this test code
>
>#define GRIDDIM 2
>#define WORLDDIM 2
>
>#include <config.h>
>#include <dune/grid/albertagrid.hh>
>
>int main(int argc,char **argv){
>
> #if defined HAVE_ALBERTA
You are getting for a defined variable. The convention is that Alberta is not available if HAVE_ALBERTA evaluates to false. This is the case if it is defined to 0, undefined or defined to something which is not an integer. This means you have to change test to
#if HAVE_ALBERTA
This will then (presumably) evaluate to false, because ( I guess) you didn't add the Alberta flags in your Makefile.am
Ciao Christian
> typedef Dune::AlbertaGrid<GRIDDIM,WORLDDIM> GridType;
> #endif
>
> return 0;
>}
>
>I obtain the following error:
>error: ‘AlbertaGrid’ in namespace ‘Dune’ does not name a type
> typedef Dune::AlbertaGrid<GRIDDIM,WORLDDIM> GridType;
>
>I have already try many different things but nothing worked. Any idea
>is well accepted:)
>Thank you very much,
>
>Marco Agnese
>
>
>_______________________________________________
>Dune mailing list
>Dune at dune-project.org
>http://lists.dune-project.org/mailman/listinfo/dune
More information about the Dune
mailing list