2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 18:12:43 +00:00

This commit was manufactured by cvs2svn to create branch 'RC_1_29_0'.

[SVN r15827]
This commit is contained in:
nobody
2002-10-09 14:31:40 +00:00
43 changed files with 3734 additions and 0 deletions

15
example/tutorial/Jamfile Normal file
View File

@@ -0,0 +1,15 @@
# Hello World Example from the tutorial
# [Joel de Guzman 10/9/2002]
# Specify our location in the boost project hierarchy
subproject libs/python/example/tutorial ;
# Include definitions needed for Python modules
SEARCH on python.jam = $(BOOST_BUILD_PATH) ;
include python.jam ;
extension hello # Declare a Python extension called hello
: hello.cpp # source
<dll>../../build/boost_python # dependencies
;

View File

@@ -0,0 +1,17 @@
// Hello World Example from the tutorial
// [Joel de Guzman 10/9/2002]
char const* greet()
{
return "hello, world";
}
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
using namespace boost::python;
BOOST_PYTHON_MODULE(hello)
{
def("greet", greet);
}