Skip to content

fix(stlgeom): export STLMeshingDummy with DLL_HEADER#252

Open
ahojukka5 wants to merge 1 commit into
NGSolve:masterfrom
ahojukka5:fix/stlmeshingdummy-dll-export
Open

fix(stlgeom): export STLMeshingDummy with DLL_HEADER#252
ahojukka5 wants to merge 1 commit into
NGSolve:masterfrom
ahojukka5:fix/stlmeshingdummy-dll-export

Conversation

@ahojukka5

Copy link
Copy Markdown

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.

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 <type> 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.
Copilot AI review requested due to automatic review settings July 2, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Exports netgen::STLMeshingDummy from the shared library by applying the project’s DLL_HEADER visibility macro to its public declaration, enabling external consumers (e.g., bindings) to link against the symbol in default-hidden visibility builds.

Changes:

  • Adds DLL_HEADER to the STLMeshingDummy free-function declaration in stlgeom.hpp to ensure it is exported from .so/.dylib builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants