473,418 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

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 2897
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Natsu Mizutani | last post by:
Hello, I'm trying to wrap a c++ library using MPI inside with boost.python (or SWIG). I managed to find that calling `MPI::Init()` embeded in a c++ funtion would not work. So, I decided to use...
2
by: Squirrel Havoc | last post by:
Hello. I am sorry if this has been asked before, but I am new here. If I recall correctly, Python can be used as a scripting language for other programs, as if the program had a builtin Python...
2
by: lallous | last post by:
Hello Many are saying that Boost will be included in the c++ standard...Does that mean that every new compiler release will have Boost included with it in order conform to portability? Does...
0
by: Andrew Ayre | last post by:
Hi, I can't seem to get the library built, and any help is greatly appreciated. Here is the info: Windows XP Borland C++ Builder 5 Latest Boost source code (downloaded at the weekend) Windows...
1
by: KraftDiner | last post by:
Hi, I'm trying to call a C++ class from python. I've looked around and the solution would appear to be boost. I'm not sure but maybe I've downloaded and installed the entire boost library, when...
3
by: TonyHa | last post by:
Hello I try to install boost_1_33_1 on RedHat Linux. I have downloaded boost into /user/dtgtools/tmp and I try to install it into /user/dtgtools/packages/boost. I use the following commands:...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
4
by: Shawn McGrath | last post by:
Hi, I'm trying to expose a C++ class' internals to python via boost::python. I can do integer/boolean functions fine, but as soon as I do a string get/set it craps out. ...
6
by: Soren | last post by:
Hi! I'm trying to extend my python program with some C++ code. Right now I've spent hours just trying to get boost to work! I'm trying to get the example hello.cpp to work. Using Windows XP...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.