[C++-sig] Embedding Python with Boost

Roman Yakovenko roman.yakovenko at gmail.com
Tue Apr 3 19:56:18 CEST 2007


On 4/3/07, Ron Brown, Jr. <rbrown at gamry.com> wrote:
>
> Greetings,
>
> I've been having a bit of trouble in making a simple embedded python
> application using boost, and am in need of some guidance.  Hopefully I'm
> in the right place.  All I'm trying to do is just fit the basic pieces
> together to see if embedding python is a viable solution for my next
> project.
>
> I'm on Windows using mingw tools, specifically:
> g++ (GCC) 3.4.2 (mingw-special)
> Boost 1.33.1
> Python 2.5


I suggest you to try other Boost version.  Recently there were some post,
where David Abrahams said build system was broken on this platform.

I was able to build Boost after minimal problems, mostly from setting up
> my environment for Boost.Jam.  All of the examples, including the
> embedding.cpp example, seem to all compile/link just fine, and I'm able
> to import the example Python extensions and use them.
>
> My problem lies in getting the most basic embedded Python application
> (see below) to link.
>
> I'm trying to link my simple app here with boost_python.lib and
> python25.lib.  When I try to link, I'm getting:
> C:/Boost/boost_1_33_1/boost/python/cast.hpp: undefined reference to
> `_imp___Py_NoneStruct'

Am I barking up the wrong tree by trying to statically link those libs?


Are you sure you are linking with the right version of Python?

Any advice that anyone could give would be greatly appreciated.  Thanks
> in advance,


I guess the problem with your "make" files.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070403/b41e9075/attachment.htm>


More information about the Cplusplus-sig mailing list