Python .pyd equivalent on linux
<p>I have some c++ code that is working as a python module using boost.
It is actually a plugin of another c++ python module.</p>

<p>On windows, I have to link against a <code>libavg.pyd</code> file of this library.</p>

<p>On linux I tried linking against <code>libavg.so</code>, but when doing that, dlopen fails with undefined references to functions that should be defined in <code>libavg.pyd</code>.</p>

<p>What is the equivalent of linking to a .pyd file on linux?</p>

<p>On linux .pyd equivalent is .so files.</p>

<p>I'm not know about Boost::Python specifics, but you can try to use script like this:</p>

<pre><code>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])
</code></pre>

<p>And after this just import your built module with .so-extension.</p>

python c++ linux python-2.7