[C++-sig] Embedding Python with Boost

David Abrahams dave at boost-consulting.com
Sat Apr 7 20:32:43 CEST 2007


on Mon Apr 02 2007, "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 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.

If the embedding.cpp example links and runs, just invoke bjam with -n
-a and look at the commands it is using to make things work.  If you
can reproduce those commands there's no reason it shouldn't work for
you.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Don't Miss BoostCon 2007! ==> http://www.boostcon.com




More information about the Cplusplus-sig mailing list