[Dune] including vtk-libraries in the dune-build system

egleiss at iup.uni-heidelberg.de egleiss at iup.uni-heidelberg.de
Fri Nov 14 18:31:22 CET 2014


Ok, now it works. thank you very much :)
Best wishes,
Eric

> Alright, what is missing are the actual libs to link to.  So far with
> -L<...>
> you just told the build system where the libraries are, but not which ones
> you
> want.  You also need to specify -lvtk or something similar.  For a
> one-shot
> thing you should be able to do that in LIBS in your opts-file; that should
> get
> you going.
>
> If you wanna do it correctly though you should specify the include path
> (-I...) in <program>_CPPFLAGS and the library path (-L...) and the libs
> (-l...) in <program>_LDADD in your Makefile.am.  To be really correct you
> should tell configure to find out where vtk is located on your system and
> set
> variable such as VTK_CPPFLAGS and VTK_LIBS to be used in your Makefile.am.
>
> Regards,
> Jö.
>
> Am Wed, 12. Nov 2014, 15:50:19 +0100 schrieb
> egleiss at iup.uni-heidelberg.de:
>> Date: Wed, 12 Nov 2014 15:50:19 +0100
>> From: egleiss at iup.uni-heidelberg.de
>> To: Jö Fahlke <jorrit at jorrit.de>
>> Cc: dune at dune-project.org
>> Subject: Re: [Dune] including vtk-libraries in the dune-build system
>>
>> >> My opts-file looks as follows:
>> >>
>> >> CONFIGURE_FLAGS="--prefix=/Users/ericgleiss/opt
>> --disable-documentation
>> >> --disable-mpiruntest --enable-parallel
>> >> --with-alugrid=/Users/ericgleiss/opt/alugrid
>> >> --with-alberta=/Users/ericgleiss/opt/alberta
>> >> --with-ug=/Users/ericgleiss/opt/ug-install CXX=g++-mp-4.8
>> CC=gcc-mp-4.8
>> >> F77=gfortran-mp-4.8 CXXFLAGS=\"-O3  -g0 -funroll-loops
>> -ftree-vectorize
>> >> -fno-strict-aliasing -Wall -Wno-deprecated-declarations
>> >> -I/usr/local/include/vtk-6.1/ -L/Users/ericgleiss/VTK-build/lib \"
>> >> CFLAGS=\"-O3 -g0 -funroll-loops -ftree-vectorize -fno-strict-aliasing
>> >> -Wall -Wno-deprecated-declarations\""
>> >> MAKE_FLAGS="all"
>> > [...]
>> >> I do not really understand, what's happening here. I suppose that the
>> >> libraries are not recognized correctly. If I run the example outside
>> the
>> >> dune environment it works without problems. The libraries are some
>> >> .dylib
>> >> files in the folder /Users/ericgleiss/VTK-build/lib, which I include
>> in
>> >> my
>> >> opts-file.
>> >> Does anyone have a clue what is going on here?
>> >> How can I correctly link the libraries to the dune build system?
>> >> Thank you beforehand.
>> >
>> > The -L... stuff should go into LIBS (or LDFLAGS, if you believe
>> > ./configure
>> > --help) but definitely not into CXXFLAGS.  You get the error during
>> > linking,
>> > and the contents of CXXFLAGS is not passed to the linker.
>> >
>> > If this does not help send the Makefile.am that is used to build the
>> > program.
>>
>>
>> I have added the LDFLAGS to my opts file. It looks now as follows:
>>
>> CONFIGURE_FLAGS="--prefix=/Users/ericgleiss/opt --disable-documentation
>> --disable-mpiruntest --enable-parallel
>> --with-alugrid=/Users/ericgleiss/opt/alugrid
>> --with-alberta=/Users/ericgleiss/opt/alberta
>> --with-ug=/Users/ericgleiss/opt/ug-install CXX=g++-mp-4.8 CC=gcc-mp-4.8
>> F77=gfortran-mp-4.8 CXXFLAGS=\"-O3  -g0 -funroll-loops -ftree-vectorize
>> -fno-strict-aliasing -Wall -Wno-deprecated-declarations
>> -I/usr/local/include/vtk-6.1/ \"  LDFLAGS=\" -L/usr/local/lib/
>> -L/Users/ericgleiss/VTK-build/lib/ \"
>> LIBS=\"-L/Users/ericgleiss/VTK-build/lib/ -L/usr/local/lib/ \"
>> CFLAGS=\"-O3 -g0 -funroll-loops -ftree-vectorize -fno-strict-aliasing
>> -Wall -Wno-deprecated-declarations\""
>> MAKE_FLAGS="all"
>>
>> But nothing has changed. So I am sending the Makefile.am
>> Thanks.
>> Eric
>>
>>
>>
>
>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>
>
> --
> 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
>
> In the beginning the Universe was created.  This has made a lot of
> people very angry and been widely regarded as a bad move.
> -- Douglas Adams
>






More information about the Dune mailing list