JNAerator Unnamed Union Missing in Structure
Posted
by Nick
on Stack Overflow
See other posts from Stack Overflow
or by Nick
Published on 2010-03-23T20:01:48Z
Indexed on
2010/03/23
20:13 UTC
Read the original article
Hit count: 185
I'm trying to get JNAerator to generate some JNA backed Java code from a C shared library and everything is fine except that it failed to generate an unnamed union nested inside a structure.
Example:
typedef struct MY_STRUCTURE {
union {
My_Type1 var1;
My_Type2 var2;
};
}MY_STRUCTURE;
If I change the header to make the union have a name it will work. But for obvious reasons I can't just change the header without breaking the shared library I'm trying to use.
Any solutions other than changing the header file and shared library to named union?
© Stack Overflow or respective owner