Skip to content

Commit 316273e

Browse files
authored
fix: don't force -fvisibility=hidden on Windows (#5757)
Fix #5750
1 parent c4ee83c commit 316273e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/detail/pybind11_namespace_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
// requires forcing hidden visibility on pybind code, so we enforce this by setting the attribute
7575
// on the main `pybind11` namespace.
7676
#if !defined(PYBIND11_NAMESPACE)
77-
# ifdef __GNUG__
77+
# if defined(__GNUG__) && !defined(_WIN32)
7878
# define PYBIND11_NAMESPACE pybind11 __attribute__((visibility("hidden")))
7979
# else
8080
# define PYBIND11_NAMESPACE pybind11

0 commit comments

Comments
 (0)