This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Makefile in c++

+2 votes

Hi, I'm trying to use FEniCS in my other c++ coded simulations.
For instance to implement the Poisson solver, my understanding was that once the Poisson.h is generated from the ufl file, it could be included in any other C++ code together with dolfin.h.
The problem is I'm not quite sure how to write the Makefile. Those in the demo are not quite similar to the simple ones I'm used to. It seems something specific for cmake is involved.

So, I'm wondering if there is a simpler way for the Makefile, like only linking the proper .so lib files. If not, is there some detailed instructions and tutorials that I can follow?
Thank you in advance.

asked Feb 16, 2014 by rocdawn FEniCS Novice (200 points)

1 Answer

+1 vote

For your own well being, you should use CMake. It is very easy. Copy the CMakeLists.txt from the Poisson demo, then do the following:

mkdir build
cd build
cmake ..
make
answered Feb 18, 2014 by logg FEniCS Expert (11,790 points)
...