<div dir="ltr">I get the following error when trying to import a pyd file in python.<br>I&#39;m trying to use this with the Delta3D game engine to access VRPN data.<br><br>------<br>Traceback (most recent call last):<br>&nbsp; File &quot;hello.py&quot;, line 2, in &lt;module&gt;<br>
&nbsp;&nbsp;&nbsp; import PyVrpnData<br>ImportError: dynamic module does not define init function (initPyVrpnData)<br><br>------<br><br>Here&#39;s the python file.<br><br>------<br>import PyVrpnData<br><br>print &quot;hello&quot;<br><br>
print PyVrpnData.getPos(1)<br><br>print &quot;done&quot;<br>------<br><br>I&#39;m trying to use boost but not use bjam as it appears Delta3D has done.<br>Here is the source.<br><br>--------<br><br>float getPos(int i);<br>
float getQuat(int i);<br><br>void initPyVrpnData()<br>{<br>&nbsp;&nbsp;&nbsp; using namespace boost::python;<br>&nbsp;&nbsp;&nbsp; def(&quot;getPos&quot;,getPos);<br>&nbsp;&nbsp;&nbsp; def(&quot;getQuat&quot;,getQuat);<br>}<br>-------<br><br>#include &lt;boost/python.hpp&gt;<br>
<br>extern &quot;C&quot; __declspec(dllexport) void initPyVrpnData();<br><br>BOOST_PYTHON_MODULE(PyVrpnData)<br>{<br>&nbsp;&nbsp;&nbsp; initPyVrpnData();<br>}<br>--------<br><br></div>