JNAeration failed ! org.anarres.cpp.InternalException: Bad token [╗@1,1]:"╗"
ml007r opened this issue · comments
wrapper could not be generated see image (or text following).
Is that due to Java 8?
C:\Users\Marcel\workspace\edsdk4j-master>ant generate-wrapper
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre8\li
b\tools.jar
Buildfile: C:\Users\Marcel\workspace\edsdk4j-master\build.xml
generate-wrapper:
[exec] Aug 19, 2014 9:38:22 PM com.ochafik.admin.visualstudio.VisualStudioU
tils getProp
[exec] INFO: [environment] ProgramFiles(x86)=C:\Program Files (x86)
[exec] Aug 19, 2014 9:38:22 PM com.ochafik.admin.visualstudio.VisualStudioU
tils getProp
[exec] INFO: [environment] VISUAL_STUDIO_HOME=C:\Program Files (x86)\Micros
oft Visual Studio 9.0
[exec] Aug 19, 2014 9:38:22 PM com.ochafik.admin.visualstudio.VisualStudioU
tils getProp
[exec] INFO: [environment] ProgramFiles(x86)=C:\Program Files (x86)
[exec] Aug 19, 2014 9:38:22 PM com.ochafik.admin.visualstudio.VisualStudioU
tils getProp
[exec] INFO: [environment] WINDOWS_SDK_HOME=C:\Program Files (x86)\Microsof
t SDKs\Windows\v6.0A
[exec] Aug 19, 2014 9:38:22 PM com.ochafik.admin.visualstudio.VisualStudioU
tils getProp
[exec] INFO: [environment] VISUAL_STUDIO_INCLUDES=C:\Program Files (x86)\Mi
crosoft Visual Studio 9.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windo
ws\v6.0A\Include
[exec] JNAeration failed !
[exec] org.anarres.cpp.InternalException: Bad token [╗@1,1]:"╗"
[exec] at org.anarres.cpp.Preprocessor._token(Preprocessor.java:1745)
[exec] at org.anarres.cpp.Preprocessor.token(Preprocessor.java:1977)
[exec] at org.anarres.cpp.CppReader.refill(CppReader.java:93)
[exec] at org.anarres.cpp.CppReader.read(CppReader.java:125)
[exec] at org.anarres.cpp.CppReader.read(CppReader.java:136)
[exec] at java.io.Reader.read(Unknown Source)
[exec] at com.ochafik.io.ReadText.readText(ReadText.java:52)
[exec] at com.ochafik.lang.jnaerator.PreprocessorUtils.preprocessSource
s(PreprocessorUtils.java:61)
[exec] at com.ochafik.lang.jnaerator.JNAeratorParser.parse(JNAeratorPar
ser.java:191)
[exec] at com.ochafik.lang.jnaerator.JNAerator.parseSources(JNAerator.j
ava:1111)
[exec] at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:
816)
[exec] at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.jav
a:716)
[exec] at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParse
r.parse(JNAeratorCommandLineArgs.java:98)
[exec] at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:290)
[exec] at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:171)
[exec] Finished with errors.
BUILD SUCCESSFUL
Total time: 1 second
hey!
might be a duplicate of #7
anyways...
first -- and maybe i should make this more clear -- there is usually no need to regenerate the bindings.
the files in the package edsdk.bindings are already the result of the jnaerator being run. just add the files from the esdk4j to eclipse. make sure edsdk dll's are in the right place. that's all.
about your actual error: there is a unicode byte order mark in canon's files which confuses jnaerator.
either use a hexeditor to remove the first 3 bytes from each header file, or if you have cygwin this should work:
grep -rl $'\xEF\xBB\xBF' . | xargs perl -i -pe 's{\xEF\xBB\xBF}{}'
best, hansi.
Thanks for the quick answer! I misunderstood your readme...sorry for this!