diff --git a/ng/netgenpy.cpp b/ng/netgenpy.cpp index 1179a7ed..9478dadf 100644 --- a/ng/netgenpy.cpp +++ b/ng/netgenpy.cpp @@ -25,3 +25,12 @@ BOOST_PYTHON_MODULE(libngpy) ExportGeom2d(); } +// Force linking libnglib to libnetgenpy +namespace netgen +{ + void MyBeep (int i); + void MyDummyToForceLinkingNGLib() + { + MyBeep(0); + } +} diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index 2eae341b..e12910df 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -1228,7 +1228,6 @@ namespace netgen - //void Render() { ; } } // End of namespace netgen @@ -1247,3 +1246,10 @@ void Ng_SetSolutionData (Ng_SolutionData * soldata) void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; } */ +// Force linking libinterface to libnglib +#include <../interface/writeuser.hpp> +void MyDummyToForceLinkingLibInterface(Mesh &mesh, NetgenGeometry &geom) +{ + netgen::WriteUserFormat("", mesh, geom, ""); +} +