From f32e9caf08d5935cd35595312587fbf89e2c0970 Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Thu, 2 Jul 2026 08:13:02 +0300 Subject: [PATCH] fix(stlgeom): export STLMeshingDummy with DLL_HEADER STLMeshingDummy is the free function that lets a caller supply a custom STLParameters when meshing an STL geometry (bypassing the global stlparam singleton that STLGeometry::GenerateMesh hardcodes) -- it's what upstream's own Python bindings (python_stl.cpp) call for exactly this reason. Its declaration in stlgeom.hpp had no DLL_HEADER export macro, unlike virtually every other public free function in this codebase (see e.g. general/template.hpp, meshing/boundarylayer.hpp, meshing/bisect.hpp for the established "DLL_HEADER extern Name(...)" convention). Practical effect: on a shared-library build with default-hidden visibility, this symbol is compiled into stlgeommesh.cpp's object file but not exported from the resulting .dylib/.so, so any external binding layer linking against Netgen's public shared library gets an undefined-symbol error at link time when trying to call it directly, even though the header declares it as callable. --- libsrc/stlgeom/stlgeom.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/stlgeom/stlgeom.hpp b/libsrc/stlgeom/stlgeom.hpp index 859bee3c..67c23338 100644 --- a/libsrc/stlgeom/stlgeom.hpp +++ b/libsrc/stlgeom/stlgeom.hpp @@ -484,7 +484,7 @@ namespace netgen -extern int STLMeshingDummy (STLGeometry* stlgeometry, shared_ptr & mesh, const MeshingParameters & mparam, +DLL_HEADER extern int STLMeshingDummy (STLGeometry* stlgeometry, shared_ptr & mesh, const MeshingParameters & mparam, const STLParameters& stlpar);