On 2/8/07, Alexander Eisenhuth <<a href="mailto:newsuser@stacom-software.de">newsuser@stacom-software.de</a>> wrote:<br>> Hello,<br>> <br>> Py++: 0.8.5<br>> Compiler: VC6.0<br>> GCC-XML version 0.6.0<br>
> <br>> I tried Py++ GUI. The generated Boost.Python C++ code couldn't be compiled. Reason:<br>> <br>> (VC compile error):<br>> <file location generated code> :<br>> error C2352: 'Math::Math_E::what' : illegal call of non-static member function
<br>> <file location header> : see declaration of 'what'<br>> <br>> Coresponding Codesnips:<br>> <br>> <generated code> :<br>> virtual char const * what( ) const {<br>> if( bp::override func_what = this->get_override( "what" ) )
<br>> return func_what( );<br>> else<br>> return Math::Math_E::what( ); // (wrong, not static)<br>> }<br><br>You didn't provide enough details, but I think I can make reasonable assumption.
<br><br>First of all "what" function belong to Math_E_wrapper class<br><br>struct Math_E_wrapper : Math::Math_E, boost::python::wrapper<Math::Math_E><br><br>Am I right?<br><br>If so, than the line "return Math::Math_E::what( ); " should be interpreted by compiler
<br>as a call to base class member function. I think can fix the error by changing generated<br>code to be "return this->Math::Math_E::what( );"<br><br>Can you test it?<br><br>Take a look on tutorials( <a href="http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations">
http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations</a> )<br>The generated code is not that different.<br><br>> <header> :<br>> virtual const char * what () const;
<br><br>> At stdout there are a lot of warnings ... but they seems not be related on what.<br>> What is the reason?<br><br>I don't understand the question, can you explain what do you mean?<br><br>P.S. If it is possible than switch to MSVC
7.1 compiler. It is much better.<br><br>-- <br>Roman Yakovenko<br>C++ Python language binding<br><a href="http://www.language-binding.net/">http://www.language-binding.net/</a><br>