Hi, 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?
Thanks! Jason -- View this message in context: http://pylucene-users-developers-list.2474766.n2.nabble.com/jcc-compile-a-simple-java-class-with-errors-void-java-method-translation-may-be-incorrect-tp6705781p6705781.html Sent from the PyLucene users & developers list mailing list archive at Nabble.com.