[C++-sig] gcc flag -fvisibility=hidden not working with boost::python

Renato Araujo renatox at gmail.com
Fri Mar 20 17:46:57 CET 2009


I have worked with some gcc flags to reduce my binding size. After
some time using this -fvisibility=hidden with my library, I discovered
a strange behavior on boost::python more specific in object call
function like this:

python::call_method<void>(py_obj.ptr(), "myVirtualFunction");

The problem is: When I use this flag boost always call my "virtual
default" implementation and without this flag boost always call the
correct virtual method, I don't know what this is happening. I would
like to know if someone has any idea why this is happening?

I create this small test to show the problem. This flags is very
important for me because I got size reduction about 50% with this.


Renato Araujo Oliveira Filho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boosttest_visibility.tar
Type: application/x-tar
Size: 20480 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090320/0a83205f/attachment-0001.tar>

More information about the Cplusplus-sig mailing list