boost.python: ImportError: dynamic module does not define init function; bjam succesfully compiled and linked the code....
Michael Fabbri <[email protected]> Mon, 24 Jan 2011 23:23:58 -0800 (PST)
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Message-ID | <[email protected]> |
--===============3771178185546155295==
Content-Type: multipart/alternative; boundary="0-687598632-1295940238=:885"
--0-687598632-1295940238=:885
Content-Type: text/plain; charset=us-ascii
bjam compiles and links the following c++ file, but when the module is imported
into python the error message in the subject line of this message is reported.
class pyBase: public SciDBRemote {
private:
public:
>SciDBRemote py_SciDB;
>>
>>pyBase(int i) { int j = i; j++; py_SciDB = _sciDB; };
>>
>>SciDB& getPySciDB() { return py_SciDB; }
};
BOOST_PYTHON_MODULE(SciDBRemotePy) {
class_<pyBase>("pyBase",init<int>())
>
>
> .def("getPySciDB",
>&pyBase::getPySciDB,return_value_policy<reference_existing_object>())
>}
>
What does this python import error means with regards to the boost.python
library, and what boost.python feature must be used to resolve it?
Thank you
Mike Fabbri
--0-687598632-1295940238=:885
Content-Type: text/html; charset=us-ascii
<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000;"><div class="searchable">
<p>
bjam compiles and links the following c++ file, but when the module is
imported into python the error message in the subject line of this message is reported. <br></p><p><br></p><p><br></p>
<p>
class pyBase: public SciDBRemote
{ <br></p><p> private:
</p>
<blockquote>
<p>
public:
</p>
<blockquote>
<p>
SciDBRemote py_SciDB; <br></p><p>pyBase(int i) { int j = i; j++; py_SciDB = _sciDB; }; <br></p><p>SciDB& getPySciDB() { return py_SciDB; }
</p>
</blockquote>
</blockquote>
<p>
}; <br></p><p><br></p>
<p>
BOOST_PYTHON_MODULE(SciDBRemotePy)
{
</p>
<blockquote>
<p>
class_<pyBase>("pyBase",init<int>())</p><p><br></p><p> .def("getPySciDB", &pyBase::getPySciDB,return_value_policy<reference_existing_object>())<br></p> } <br></blockquote><blockquote><blockquote><p></p></blockquote>
</blockquote>
<p>
What does this python import error means with regards to the
boost.python library, and what boost.python feature must be used to
resolve it? <br></p><p><br></p>
<p>
Thank you
</p>
</div><div> </div>Mike Fabbri<div><br></div>
</div><br>
</body></html>
--0-687598632-1295940238=:885--
--===============3771178185546155295==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
--===============3771178185546155295==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Boost-langbinding mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-langbinding
--===============3771178185546155295==--