I have written simple HelloWorld class. and write a boost python wrapper.and debug the code as DLL.My question is how can i expose this code in python and use greet function.I tried by giving the path in sys.path.insert. but not able to get greet function. The code i treid is below. Thanks for help.
#include<boost/python.hpp>
using namespace std;
using namespace boost::python;
class World
{
public:
string msg;
void set(string msg)
{
this->msg=msg;
}
string greet()
{
return msg;
}
};
BOOST_PYTHON_MODULE(ExpsoingClasses)
{
class_<World>("World")
.def("greet", &World::greet)
.def("set", &World::set)
;
}