[C++-sig] Newbie boost query

David Abrahams dave at boost-consulting.com
Thu Jan 23 01:19:33 CET 2003


Simon Frost <sdfrost at ucsd.edu> writes:

> Hi folks,

> I'm trying to feel my way around Boost.Python, and I've come unstuck
> whenever I've tried to wrap classes. For example, when I try to wrap
> a test function ((in my case, RandMT, a Mersenne twister class from
> Paul Gresham, from http://www.math.keio.ac.jp/~matumoto/july00.html)

FWIW, we have a mersenne twister in Boost's "Random" library.

> with the following functions:

> (i.e. just exposing the default constructor and the randomMT
> function)

The problems don't have anything to do with the code you used for wrapping.

> I get a bunch of errors abput undefined references:

These are linker errors due to the fact that you're not bringing in
the Boost.Python DLL's import lib.  Are you following the instructions
at
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/libs/python/doc/building.html#building_ext
??

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution





More information about the Cplusplus-sig mailing list