[C++-sig] Complete confustion about using Boost.Python
Noah Schwartz
noah.schwartz1 at gmail.com
Thu Sep 14 20:57:08 CEST 2006
Good idea :D
Boost is installed on my machine at /usr/local/include/boost-1_33_1 (this is
the directory with the boost subdirectory)
The libs are installed on my machine at /usr/local/lib
This is the Jamfile that I am using:
# Hello World Example from the tutorial
# Copyright Joel de Guzman 2002-2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
# [Joel de Guzman 10/9/2002]
# This is the top of our own project tree
project-root ;
# Include definitions needed for Python modules
import python ;
extension hello # Declare a Python extension called hello
: hello.cpp # source
# requirements and dependencies for Boost.Python extensions
<template>@boost/libs/python/build/extension
;
This is the Jamrules file that I am using:
# Copyright David Abrahams 2003. See accompanying LICENSE for terms
# and conditions of use.
# If you move this example from its place in the Boost tree, edit this
# path to point at the root directory of your Boost installation (the
# one containing a subdirectory called "boost/" and a sub-subdirectory
# "boost/python/" full of .hpp files). Absolute paths work, too.
#
path-global BOOST_ROOT : /usr/local/include/boost-1_33_1 ;
# Boost.Python configuration variables, as described in
# http://www.boost.org/libs/python/doc/building.html#configuration.
# Usually you don't need to set these; the defaults will work. If you
# do set them, try to change as few of them as possible, starting with
# the first ones.
# PYTHON_VERSION = <the two-part Major.Minor version number, e.g. 2.2> ;
# PYTHON_ROOT = <root directory of your Python installation, e.g. /usr> ;
# PYTHON_INCLUDES = <path to Python #include directories> ;
# PYTHON_LIB_PATH = <path to Python library object> ;
# You may need to configure your compiler toolset, especially if you
# want to build with a compiler that is not the "system default" or if
# it is installed in a nonstandard place; see
# http://www.boost.org/more/getting_started.html#Configuring for
# details.
# Makes a project id for boost so that other Boost.Build projects can
# refer to it by name.
#
project boost : $(BOOST_ROOT) ;
# Change this setting to have all your built products placed under a
# single directory:
#
# ALL_LOCATE_TARGET = <root directory for all built products>
Like I said, copied from the examples directory in the extracted source with
the exception of the change to BOOST_ROOT.
On Thursday 14 September 2006 14:45, Eduardo Picado wrote:
> On 9/14/06, Noah Schwartz <noah.schwartz1 at gmail.com> wrote:
> > Hi,
>
> Hi,
>
> > I've recently built Boost based on the instructions at
> > http://boost.org/more/getting_started.html. It found my python
> > installation OK and so as far as I know that means Boost.Python has been
> > installed on my system.
> >
> > The issue I am having is that I can't seem to figure out how to build
> > any
> > modules that are not within the directory tree of the source I extracted
> > from sourceforge. If I copy the exact tutorial out of
> > libs/python/example/tutorial and try to build it elsewhere, it complains
> > about not being able to find a project-root.jam file. Also, I have
> > noticed that if I set the BOOST_ROOT path in say, for example, the
> > Jamrules file in the that tutorial directory to where boost is now
> > actually installed (/usr/local/include/boost-1_33_1), I can no longer
> > build. What am I missing here? Right now it seems like I can only build
> > projects in the directory tree of the source I extracted from the
> > website.
>
> What error did you get?
> Can you show the Jamfile and Jamrules you are using?
>
>
> Eduardo
>
> > Thanks,
> > Noah
> > _______________________________________________
> > C++-sig mailing list
> > C++-sig at python.org
> > http://mail.python.org/mailman/listinfo/c++-sig
More information about the Cplusplus-sig
mailing list