469,609 Members | 1,657 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

using boost to extend python with c++

Hi,

I've been trying for days to make either boost.python or swig to
work for me. The one I have gotten the closest to is boost. Note that
this is for windows XP. I'm not much of an unix person besides doing
simple ls and copy paste.

What I have done is to download the boost library: C:\boost_1_34_0
I downloaded the bjam library: C:\boost-jam-3.1.14-1-ntx86

I then set up the path so that I could do bjam from anywhere suing the
coomand prompt. Did the same for python and g++. I'm using the g++
that came with bloodshed DevC++ compiler.

So, I navigated myself to the tutorial example in the boost library.
C:\boost_1_34_0\libs\python\example\tutorial

In the command prompt I typed bjam and I got the following error message.

C:\boost_1_34_0\libs\python\example\tutorial>bjam
Jamroot:17: in modules.load
rule python-extension unknown in module
Jamfile</C:/boost_1_34_0/libs/python/example/tutorial>.
C:/boost_1_34_0/tools/build/v2/build\project.jam:312: in load-jamfile
C:/boost_1_34_0/tools/build/v2/build\project.jam:68: in load
C:/boost_1_34_0/tools/build/v2/build\project.jam:170: in project.find
C:/boost_1_34_0/tools/build/v2\build-system.jam:237: in load
C:\boost_1_34_0\libs\python\example\..\..\..\tools \build\v2/kernel\modules.jam:261:
in import
C:\boost_1_34_0\libs\python\example\..\..\..\tools \build\v2/kernel/bootstrap.jam:132:
in boost-build
C:\boost_1_34_0\libs\python\example\boost-build.jam:7: in module scope
I've have been trying desperately for 3 days. I also tried swig with
similar results but I feel I'm closer to solving the issue with boost
than with swig. I'm at a total lost here. I have tried the tutorials
in the boost web page but I just don't get anywhere.

http://www.boost.org/libs/python/doc...hon/hello.html

May 6 '07 #1
2 2742
On May 6, 4:12 pm, "mr_gees100_peas" <mr_gees100_p...@yahoo.com>
wrote:
Hi,

I've been trying for days to make either boost.python or swig to
work for me. The one I have gotten the closest to is boost. Note that
this is for windows XP. I'm not much of an unix person besides doing
simple ls and copy paste.

What I have done is to download the boost library: C:\boost_1_34_0
I downloaded the bjam library: C:\boost-jam-3.1.14-1-ntx86

I then set up the path so that I could do bjam from anywhere suing the
coomand prompt. Did the same for python and g++. I'm using the g++
that came with bloodshed DevC++ compiler.

So, I navigated myself to the tutorial example in the boost library.
C:\boost_1_34_0\libs\python\example\tutorial

In the command prompt I typed bjam and I got the following error message.

C:\boost_1_34_0\libs\python\example\tutorial>bjam
Jamroot:17: in modules.load
rule python-extension unknown in module
Jamfile</C:/boost_1_34_0/libs/python/example/tutorial>.
C:/boost_1_34_0/tools/build/v2/build\project.jam:312: in load-jamfile
C:/boost_1_34_0/tools/build/v2/build\project.jam:68: in load
C:/boost_1_34_0/tools/build/v2/build\project.jam:170: in project.find
C:/boost_1_34_0/tools/build/v2\build-system.jam:237: in load
C:\boost_1_34_0\libs\python\example\..\..\..\tools \build\v2/kernel\modules.jam:261:
in import
C:\boost_1_34_0\libs\python\example\..\..\..\tools \build\v2/kernel/bootstrap.jam:132:
in boost-build
C:\boost_1_34_0\libs\python\example\boost-build.jam:7: in module scope

I've have been trying desperately for 3 days. I also tried swig with
similar results but I feel I'm closer to solving the issue with boost
than with swig. I'm at a total lost here. I have tried the tutorials
in the boost web page but I just don't get anywhere.

http://www.boost.org/libs/python/doc...hon/hello.html
I think your paste is incomplete.

May 6 '07 #2
Please see http://lists.boost.org/boost-build/2007/05/16666.php -- the
solution is to add "using python ;" to tools/build/v2/user-config.jam.

Jul 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Natsu Mizutani | last post: by
2 posts views Thread by Squirrel Havoc | last post: by
2 posts views Thread by lallous | last post: by
reply views Thread by Andrew Ayre | last post: by
1 post views Thread by KraftDiner | last post: by
3 posts views Thread by TonyHa | last post: by
4 posts views Thread by Shawn McGrath | last post: by
6 posts views Thread by Soren | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.