Configuring the visibility of pybind11 objects without global effect #4862
Unanswered
charlie0389
asked this question in
Q&A
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I note that in the documentation here, it is recommended to use the
-fvisibility=hidden
option when compiling code that uses pybind to eliminate the 'declared with greater visibility than the type of its field' warning.However, that approach affects compilation project wide, and I'd prefer that the '-fvisibility=hidden` option only have an affect on Pybind objects. How can this be achieved?
Please note that an approach like this does not compile:
And an approach like this does not work either:
Note that a more illustrative explanation/example of the underlying issue can be found at stackoverflow.
Beta Was this translation helpful? Give feedback.
All reactions