Hi Jason,
On Sat, 20 Aug 2011, jason_ni wrote:
I used jcc to compile a very simple java class and found this error: ------------------------------------- ... build/_ImJava/__wrap__.cpp: In function ?PyObject* idm::fudan::edu::cn::org::t_ImJava_get__total(idm::fudan::edu::cn::org::t_ImJava*, void*)?: build/_ImJava/__wrap__.cpp:8412: error: variable or field ?value? declared void build/_ImJava/__wrap__.cpp:8413: error: ?value? was not declared in this scope build/_ImJava/__wrap__.cpp:8414: error: ?t_void? has not been declared build/_ImJava/__wrap__.cpp:8414: error: ?value? was not declared in this scope error: command 'gcc' failed with exit status 1 ------------------------------------- The c++ code translated by jcc: ------------------------------------- 8410 static PyObject *t_ImJava_get__total(t_ImJava *self, void *data) 8411 { 8412 void value; 8413 OBJ_CALL(value = self->object.getTotal()); 8414 return t_void::wrap_Object(value); 8415 } ------------------------------------- The Java code: ------------------------------------- public void getTotal(){ System.out.println("error here"); } ------------------------------------- I have tested that replace "void" with "int" and gave a return value in "getTotal" then this classs can be compiled without error. So, I guess it's a bug... Am I right?
Indeed, there was a bug with not checking that the getters for which prop methods are generated aren't returning void.
It's now fixed in rev 1159920. Thank you for the bug report ! Andi..