| Store | Cart

Re: [C++-sig] Boost Python Question - Multiple Classes and Modules not appearing as attribute

From: Jon Lederman <jonl...@gmail.com>
Fri, 9 Sep 2016 09:29:41 -0400
Hi,

Thanks for the response.  However, this example doesn’t work for me either if I set the shared object file to zoo.so.  It doesn’t find the animal attribute:

http://pyengr.readthedocs.io/en/latest/inter/bpy

Can you explain why?

Thanks.

Jon


> On Sep 9, 2016, at 4:07 AM, Holger Joukl <Holg...@LBBW.de> wrote:> > Hi,> > "Cplusplus-sig" <cplu...@python.org>> schrieb am 09.09.2016 02:33:57:> >> Hi,>> >> And here is yet another person who seems to encounter the same issue:>> http://stackoverflow.com/questions/9140572/c-boost-python-2-problems>> >> -Jon> > Python expects an init function for extension modules named initNAME> where NAME is the name of the extension module, i.e. NAME.so.> (see https://docs.python.org/2/extending/extending.html)> > BOOST_PYTHON_MODULE is boost.python's macro for automagically giving you> such> an init function.> > So in the directives> - in the boost.python wrapper code: BOOST_PYTHON_MODULE(NAME)> - in the Jamroot file: python-extension NAME> (or maybe if you compile without bjam, in your g++ link step the -o> Parameter:> g++ -shared -oNAME.so -Wl,-h -Wl,NAME.so ...> # don't know if the SONAME setting (-Wl,-h -Wl,NAME.so) must also match as> # Python dlopen()s the extension)> > NAME must be consistent.> > Holger> > Landesbank Baden-Wuerttemberg> Anstalt des oeffentlichen Rechts> Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz> HRA 12704> Amtsgericht Stuttgart> > _______________________________________________> Cplusplus-sig mailing list> Cplu...@python.org> https://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
Cplu...@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
Recent Messages in this Thread
Jon Lederman Sep 08, 2016 08:29 pm
Stefan Seefeld Sep 08, 2016 08:47 pm
Jon Lederman Sep 08, 2016 09:30 pm
Stefan Seefeld Sep 08, 2016 10:00 pm
Jon Lederman Sep 08, 2016 10:33 pm
Jon Lederman Sep 08, 2016 11:38 pm
Jon Lederman Sep 08, 2016 11:44 pm
Jon Lederman Sep 09, 2016 12:33 am
Holger Joukl Sep 09, 2016 08:07 am
Jon Lederman Sep 09, 2016 01:29 pm
Stefan Seefeld Sep 09, 2016 01:42 pm
Jon Lederman Sep 09, 2016 02:00 pm
Stefan Seefeld Sep 09, 2016 02:12 pm
Messages in this thread