ochafik/nativelibs4java — Issue #255: JNAerator issue with parsing defines
Author: ENargit
Created: 2012-02-06 08:14:04+00:00
State: open

Hello,

I'm trying to use JNAerator to generate BridJ code for my open-source project Octclipse and I've run to some issues with generation. For some of them I've found workarounds, but two of them, as I see are JNAerator's bugs:

1.
When parsing line:
#define FOOBAR ""

the output is the following
Failed to convert define 'FOOBAR => "":
java.lang.IllegalArgumentException: Expecting string, got ""

2.
I could not use defines with spaces in my config.jnaerator. For instance, line
-DFOO=unsigned char
is appended directly to command line and JNAerator says, that file "char" was not found.
Workaround was to put all such defines to a separate file and include it first.

P.S. Even after all my workarounds and spikes(and resolving all defines in _jnaerator.preprocessed.c), JNAeration hangs with 100% CPU load. I am not sure that is really JNAerator bug, so it is not a good idea to post all the details here. But where can I ask for help regarding JNAeration?