this resolves the original mingw64 compilation error motivating #440
This is done in #555 which fixes both the compilation warnings seen in nanobind_example (ci example) as well as my ImportError issue in a real project.
Apologies for taking your time for a compiler you explicitly don't support - but hopefully this change is small and generic enough to be worth making. Many thanks for sharing this library!
Problem description
Building nanobind_example with gcc on Windows (mingw64) gives many warnings of the form (ci example)
warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
As well as these warnings, a real project of mine also gives an import error at runtime:
ImportError: dynamic module does not define module export function (PyInit_sme)
Proposed solution
dllimport
/dllexport
for visibility on windows (as was previously the case)visibility("hidden")
attribute for namespaces on windowsThis is done in #555 which fixes both the compilation warnings seen in nanobind_example (ci example) as well as my ImportError issue in a real project.
Apologies for taking your time for a compiler you explicitly don't support - but hopefully this change is small and generic enough to be worth making. Many thanks for sharing this library!
Reproducible example code
No response