Open cv 2.4 - opencv_java build error - gen_java.py
Visual Studio reports under build of open cv: class % (%s) is duplicated" %\ and says there's an syntax error.
The error pertains to the file gen_java.py in \opencv\modules\java\generator\
The error message indicates that line 813 in said file is the culprit. Line 813 reads:
Def add_class(self, decl):
classinfo = Classinfo(decl)
if classinfo.name in class_ignore_list:
return
name = classinfo.name
if name in self.classes:
print "Generator error: class %s (%s) is duplicated" %\
(name, classinfo.cname)
Return....
the same file in Opencv 3.1.0 in same class, line 959 (I'm using notepad++) reads:
Def add_class(self, decl): ...
self.classes[name] = classinfo
if name in type dict:
logging.warning('duplicated: %s' , classinfo)
return...
Apparantly calls to the print method in Python needs to be enclosed in parethesis thusly: print("some msg"). Original code called print only by: " some msg". It created the error messages.
can you give us the exact error msg ? (which class is duplicated, and where 's the syntax err ?)
That IS the exact error message. The syntax error is at line 813 in gen_java.py in the class add_class.
Line 34, visual studio:Generating core.cpp
Line 34, visual studio: File "c:/users/.../gen_java.py, line 813
CUSTOMBUILD : print Generator error : class %s (%s) is duplicated"% \
SyntaxError: invalid syntax
I don't think it's a duplicated class, I think it's an error in the code catching duplicated classes. The code clearly shall give the name of the duplicated class, but no name is given.
ook, sorry, i did not get it ! ;)