Hi Juan, I use this approach (shared object library for pieces, executable for the solver) approach frequently and it is a bit tricky to set up.
What I usually do is have three different CMakeLists.txt files: one to control everything, one for the library, and one for the solver. I implemented an example of this in the cdr code gallery entry: https://github.com/dealii/code-gallery/tree/master/cdr Let me know if this helps. Thanks, David Wells On Monday, May 30, 2016 at 10:35:14 AM UTC-4, Juan Carlos Araujo Cabarcas wrote: > > Dear all, > > I have several independent classes that use deal.II objects, and I would > like to pre-compile them as shared libraries to be linked to the main > executable. > The idea is to be able to do something similar than what is described here: > http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html > but as I am not really used to the cmake environment I have not been able > to reproduce a similar example with deal.ii. > > As a test example I would like to remove the class BoundaryValues from > step-4: > https://dealii.org/8.4.0/doxygen/deal.II/step_4.html > and save it as a file bval.cc pre-compile it to generate a .so file to be > linked in the main executable. > > Any ideas how to achieve this? > > Thanks in advance, > > Juan Carlos Araújo > PhD student at Umeå Universitet > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
