I get the following error message when trying to build a
modified helloworld tutorial. I'm trying to import a class.


code in hello.cpp includes
--------------------------------------------------

class GreetBase
{
public:
 GreetBase(std::string txt) : txt(txt) {}
 std::string txt;

 virtual const char * greet()
 {
    return "hi";
 }
};

BOOST_PYTHON_MODULE(hello_ext)
{
  using namespace boost::python;
  class_<GreetBase>("GreetBase")
    .def("greet", &GreetBase::greet)
  ;
}

-----------------------------
running bjam results in:

hello.cpp(46) : error C2976: 'boost::python::class_' : too few template
argument
s
      C:\Program Files\boost\boost_1_35_0\boost/python/def_visitor.hpp(14) :
s
ee declaration of 'boost::python::class_'
hello.cpp(46) : error C2440: '<function-style-cast>' : cannot convert from
'cons
t char [10]' to 'boost::python::class_'
      Source or target has incomplete type
hello.cpp(46) : error C2228: left of '.def' must have class/struct/union

--------------------
Another problem I have is that when I try to run from a python script the
dll doesn't even load(the tests from the jamroot script pass though):

C:\Program Files\boost\boost_1_35_0\libs\python\example\tutorial>python
hello.p

Traceback (most recent call last):
 File "hello.py", line 6, in <module>
  import hello_ext
ImportError: DLL load failed: This application has failed to start because
the
pplication configuration is incorrect. Reinstalling the application may fix
thi
problem.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to