Hello Christoph,
Thank you very much for your reply! I followed your advice but whenever I add #include <geometry2d.hpp> (even if the rest of the function is empty), I have new error messages:
Code:
In file included from /home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/geometry2d.hpp:1:0,
from ShapeOptimization/deformgeometry.h:1,
from main.cpp:406:
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:21:40: error: expected template-name before ‘<’ token
class SplineSegExt : public SplineSeg<2>
^
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:21:40: error: expected ‘{’ before ‘<’ token
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:21:40: error: expected unqualified-id before ‘<’ token
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:131:49: error: expected template-name before ‘<’ token
class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry
^
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:131:49: error: expected ‘{’ before ‘<’ token
/home/joachim/Documents/ResearchProject/ngsuite/ngsolve-install/bin/../include/include/../geom2d/geometry2d.hpp:131:49: error: expected unqualified-id before ‘<’ token
I tried to sort out the issue, and I thought that it could come from the fact that the compiler does not know SplineSeg and SplineGeometry at the time geometry2d.hpp is defined. So I tried to include these with:
Code:
#include "../gprim/spline.hpp"
#include "../gprim/splinegeometry.hpp"
before the #include "geometry2d.hpp" but that does not change anything to the errors.
I am a bit out of ideas because #include <gprim.hpp> and #include <meshing.hpp> do not trigger any errors, it is only the #include <geometry2d.hpp> which causes my troubles.
[EDIT: problem solved]
I put #include <geometry2d.hpp> at the top of my main file and everything runs smoothly now.
Thank you again for your kind help,
Joachim