[Dune] Problem mit GmshReader

"Jö Fahlke" jorrit at jorrit.de
Tue May 26 22:47:49 CEST 2015


Am Tue, 26. May 2015, 21:00:09 +0200 schrieb conf86 at web.de:
> Date: Tue, 26 May 2015 21:00:09 +0200
> From: conf86 at web.de
> To: Jö Fahlke <jorrit at jorrit.de>
> Cc: dune at dune-project.org
> Subject: Re: [Dune] Problem mit GmshReader

> Hallo,
> 
> vielen Dank für die schnelle Antwort!
> 
> Ich habe es nun so geschrieben:
> 
>  typedef Dune::UGGrid<2> GridType;
>  std::shared_ptr<GridType> gridp(Dune::GmshReader<GridType>::read("TEST.msh"));
>  GridType &grid = *gridp; 
> 
> bekomme aber immer noch diesen Fehler:
> 
>  libtool: link: g++ -std=c++11 -g -O2 -Wall -o TEST TEST-TEST.o -L/lib /lib/libugS2.a /lib/libugS3.a /lib/libdevS.a -lm /lib/libdunepdelab.a /lib/libdunetypetree.a /lib/libdunegrid.a /lib/libdunegeometry.a /lib/libdunecommon.a -llapack -lblas -lgfortran -lquadmath
>  TEST-TEST.o: In function `std::_Sp_counted_ptr<Dune::UGGrid<2>*,(__gnu_cxx::_Lock_policy)2>::_M_dispose()':/usr/include/c++/4.8.3/bits/shared_ptr_base.h:290: undefined reference to `Dune::UGGrid<2>::~UGGrid()'
>  TEST-TEST.o: In function `__shared_count<Dune::UGGrid<2>*>':/usr/include/c++/4.8.3/bits/shared_ptr_base.h:456: undefined reference to `Dune::UGGrid<2>::~UGGrid()'
>  TEST-TEST.o: In function `Dune::GmshReader<Dune::UGGrid<2>> ::read(std::string const&, bool, bool)':
>  /lib/include/dune/grid/io/file/gmshreader.hh:670: undefined reference to `Dune::GridFactory<Dune::UGGrid<2> >::GridFactory()'
>  /lib/include/dune/grid/io/file/gmshreader.hh:676: undefined reference to `Dune::GridFactory<Dune::UGGrid<2> >::createGrid()'
>  /lib/include/dune/grid/io/file/gmshreader.hh:676: undefined reference to `Dune::GridFactory<Dune::UGGrid<2> >::~GridFactory()'
>  /lib/include/dune/grid/io/file/gmshreader.hh:676: undefined reference to `Dune::GridFactory<Dune::UGGrid<2> >::~GridFactory()'
>  collect2: error: ld returned 1 exit status

This looks like dune-grid didn't knew about ug when it was compiled, so it did
not compile the dune-bindings to ug.  You probably specified
"--with-ug=/path/to/ug" in the CONFIGURE_FLAGS in your .opts _after_ you
configured and compiled dune-grid; i.e. you only added this flag when you
started on your own module and and did not recompile dune-grid afterwards.
Make sure you have that flag in your opts file, and recompile your dune:

  ./dunecontrol --opts=your.opts configure : make clean : make

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

This message is protected by DoubleROT13 encryption
Attempting to decode it violates the DMCA/WIPO acts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150526/e766077b/attachment.sig>


More information about the Dune mailing list