Hello to all,
#include <string>What should i do to make this as "a shared library and put it on the PYTHONPATH" as said in the tutorial?? (This question may sound trivial or silly but these are essential components that "must must" be included while writing a tutorial bcoz. it's gonna be read by people at all levels.. This 'll dampen the spirits of the beginner if he can't get to know how to compile and run it.. Sorry if i offended you..).
namespace { // Avoid cluttering the global namespace.
// A couple of simple C++ functions that we want to expose to Python.
std::string greet() { return "hello, world"; }
int square(int number) { return number * number; }
}
#include <boost/python.hpp>
using namespace boost::python;
BOOST_PYTHON_MODULE(getting_started1)
{
// Add regular functions to the module.
def("greet", greet);
def("square", square);
}