From 511cc9024aac9b6d21c7ee36a22769dc8eeee8f8 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Tue, 27 Nov 2018 13:15:25 +0800 Subject: [PATCH] fix for build issue --- paddle/fluid/pybind/protobuf.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/pybind/protobuf.cc b/paddle/fluid/pybind/protobuf.cc index 0443ff3fc..8735b6587 100644 --- a/paddle/fluid/pybind/protobuf.cc +++ b/paddle/fluid/pybind/protobuf.cc @@ -29,8 +29,16 @@ limitations under the License. */ namespace pybind11 { namespace detail { +#if !defined(PYBIND11_HIDDEN) +#ifdef _WIN32 +#define PYBIND11_HIDDEN __declspec(dllexport) +#else +#define PYBIND11_HIDDEN __attribute__((visibility("hidden"))) +#endif +#endif + // Can be replaced by a generic lambda in C++14 -struct __attribute__((visibility("hidden"))) paddle_variant_caster_visitor +struct PYBIND11_HIDDEN paddle_variant_caster_visitor : public boost::static_visitor { return_value_policy policy; handle parent; -- GitLab