ochafik/nativelibs4java — Issue #269: Error seen when using jnaerator-0.9.10-SNAPSHOT-shaded.jar
Author: rit001
Created: 2012-02-21 14:11:44+00:00
State: open

First off, I'm a bit of a novice when it comes to tools like this, so the info I can provide may not be helpful.

Background I have a small project that uses the following jnaerator config file

-

-o .
//-v
//-noLibBundle
-nocpp
//-noRuntime
-jar VDDKmapping.jar
//-gui
-v

"-I/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include"
"-I/General/pshpack and poppack.h headers"

-library vixDiskLib
-libFile "/jnaerator - C to Java mapping tool/VVDDK-64bit-5.0/bin/vixDiskLib.dll"
"/jnaerator - C to Java mapping tool/VVDDK-64bit-5.0/include/vixDiskLib.h"

-library vixMntapi
-libFile "/jnaerator - C to Java mapping tool/VVDDK-64bit-5.0/bin/vixMntapi.dll"
"/jnaerator - C to Java mapping tool/VVDDK-64bit-5.0/include/vixMntapi.h"

-

This would produce a jar with jnaerator-0.9.9-SNAPSHOT-shaded.jar but with jnaerator-0.9.10-SNAPSHOT-shaded.jar I get the following within the output

-

WARNING: Directory C:\jnaerator - C to Java mapping tool\VVDDK-64bit-5.0\include contains files from different libraries, so there won't be any default library for its files (symbols defined in files from that library that were included but not explicitly listed will not be JNAerated).

Parsing native headers...
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Normalizing parsed code...
Writing raw parsed sources to '_jnaerator.rawParsed.cpp'
Writing normalized parsed sources to '_jnaerator.normalizedParsed.cpp'
Generating libraries...
JNAeration failed !
java.lang.NullPointerException
at com.ochafik.lang.jnaerator.parser.Printer.printJava(Printer.java:986)
at com.ochafik.lang.jnaerator.Result.printJavaClass(Result.java:702)
at com.ochafik.lang.jnaerator.DeclarationsConverter.outputConvertedStruct(DeclarationsConverter.java:1474)
at com.ochafik.lang.jnaerator.DeclarationsConverter.convertStructs(DeclarationsConverter.java:1565)
at com.ochafik.lang.jnaerator.JNAerator.fillLibraryMapping(JNAerator.java:1366)
at com.ochafik.lang.jnaerator.JNAerator.generateNL4JLibraryFiles(JNAerator.java:1212)
at com.ochafik.lang.jnaerator.JNAerator.generateLibraryFiles(JNAerator.java:1163)
at com.ochafik.lang.jnaerator.JNAerator.jnaerationCore(JNAerator.java:1768)
at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:863)
at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:753)
at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:112)
at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:301)
at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:182)
Finished with errors.

-

The Warning is new and I am not sure what it means, while the error indicates that something has changed that causes the paser to now fail (or correctly fail due to issues within the headers or lib).