force linking interface to nglib and nglib to netgenpy, this avoids missing symbols when importing netgen from python

This commit is contained in:
Matthias Hochsteger 2016-08-09 14:03:47 +02:00
parent 2e936ac7b7
commit 5f29387c0b
2 changed files with 16 additions and 1 deletions

View File

@ -25,3 +25,12 @@ BOOST_PYTHON_MODULE(libngpy)
ExportGeom2d(); ExportGeom2d();
} }
// Force linking libnglib to libnetgenpy
namespace netgen
{
void MyBeep (int i);
void MyDummyToForceLinkingNGLib()
{
MyBeep(0);
}
}

View File

@ -1228,7 +1228,6 @@ namespace netgen
//void Render() { ; } //void Render() { ; }
} // End of namespace netgen } // End of namespace netgen
@ -1247,3 +1246,10 @@ void Ng_SetSolutionData (Ng_SolutionData * soldata)
void Ng_InitSolutionData (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, "");
}