I have some c++ code that is working as a python module using boost. It is actually a plugin of another c++ python module.
On windows, I have to link against a libavg.pyd file of this library.
On linux I tried linking against libavg.so, but when doing that, dlopen fails with undefined references to functions that should be defined in libavg.pyd.
What is the equivalent of linking to a .pyd file on linux?
On linux .pyd equivalent is .so files.
I'm not know about Boost::Python specifics, but you can try to use script like this:
from distutils.core import setup, Extension
module = Extension('ModuleName', sources=['yourmodule.cpp'], language="c++")
setup(name="ModuleName",
      version='1.0',
      description='My package',
      ext_modules=[module])
And after this just import your built module with .so-extension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With