Skip to content

Commit 511cc90

Browse files
committed
fix for build issue
1 parent f827501 commit 511cc90

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

paddle/fluid/pybind/protobuf.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ limitations under the License. */
2929
namespace pybind11 {
3030
namespace detail {
3131

32+
#if !defined(PYBIND11_HIDDEN)
33+
#ifdef _WIN32
34+
#define PYBIND11_HIDDEN __declspec(dllexport)
35+
#else
36+
#define PYBIND11_HIDDEN __attribute__((visibility("hidden")))
37+
#endif
38+
#endif
39+
3240
// Can be replaced by a generic lambda in C++14
33-
struct __attribute__((visibility("hidden"))) paddle_variant_caster_visitor
41+
struct PYBIND11_HIDDEN paddle_variant_caster_visitor
3442
: public boost::static_visitor<handle> {
3543
return_value_policy policy;
3644
handle parent;

0 commit comments

Comments
 (0)