[aspect-devel] Errors when compiling a plugin into a shared library

Wolfgang Bangerth bangerth at tamu.edu
Tue Mar 24 04:27:37 PDT 2015


> I'm trying to compile a plugin into a shared library for the first time, and
> I'm getting a million errors. I resolved ones related to my code, but I'm
> confused with the fact that (according to the g++ output) I'm getting a lot of
> errors in the deal.II files and files that are part of Aspect distribution.
> The command I'm executing is as follows:
> g++ -I/scratch/r/russ/lkaratun/aspect/aspect/include/
> -I/scratch/r/russ/lkaratun/aspect/dealii82/include/
> -I/scratch/r/russ/lkaratun/aspect/dealii82/include/deal.II/base/
> -I/home/r/russ/lkaratun/aspect/trilinos/include
> -I/home/r/russ/lkaratun/aspect/p4est/FAST/include -fPIC -shared plasticT.cc -o
> plasticT.so
> The output is here:
> https://www.dropbox.com/s/ab7ljpwqunqog2q/compile_log?dl=0
> Could someone please take a look and tell me what I'm doing wrong?

The question is how you build the plugin. Are you just calling the compiler on 
the command line? This will not be likely to work because you may be calling a 
different compiler than used to compile deal.II, you may be passing a 
different set of flags, etc. Use the approach using the CMakeLists.txt file 
outlined in the manual instead -- this will set up the compiler, the flags, 
the include files, etc, all correctly.

Wolfgang Bangerth               email:            bangerth at math.tamu.edu
                                 www: http://www.math.tamu.edu/~bangerth/

More information about the Aspect-devel mailing list