Open ochafik opened 9 years ago
Hi Chris,
Just so you know, I'm progressing on this : isolated a parsing regression that can be worked around by setting "typedef unsigned long *ULONG_PTR;" in a prelude.h that you'd include before the other files, and for some reason if I include d3d10.h twice I get things to work. This is with the latest snapshot, available on Sonatype OSS : https://oss.sonatype.org/content/groups/public/com/nativelibs4java/jnaerator/0.9.10-SNAPSHOT/
Please bear with me as I'm working on a fix (gotta find when I regressed the grammar !)
Cheers
From @cessationoftime on January 14, 2012 17:5
Thanks for looking into that I will try your work around later though. I am currently trying to figure out how to use DirectInput through Scala. And I wont need the DirectX until after this piece is complete.
Also, I may have found a new problem or possibly another symptom of this problem. I have found that I get better output if I split header files in half. For example:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\windef_part1.h"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\winnt_part1.h"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\basetsd.h"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\winnt_part2.h"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\windef_part2.h"
winnt.h has "#include basetsd.h" in the middle of the file and likewise windef.h has #include winnt.h" in the middle of the file. So when I wasn't getting the results I expected I tried splitting the files down the middle on the #include lines and nesting them in the config (as shown above) and the output improved. Could this be related? You said including d3d10.h twice made things work, and what I did seems somewhat similar.
From @cessationoftime on January 11, 2012 3:36
Using JNAerator-0.9.8-shaded.jar
config.jnaerator looks like this:
JNAerator is unable to give any serious output unless one comments out the #include for the math header in d3dx10.h, then it is able to parse the other files and can ignore d3dx10math.h
JNAerator appears to be failing at approx line 90 of d3dx10math.h when it reaches the following struct:
One can get pretty good output from d3dx10math.h by using "#undef __cplusplus" to ignore the faulty sections of the file and then redefining it at the end of d3dx10math.h
see: http://groups.google.com/group/nativelibs4java/browse_thread/thread/2bbe5a69e681ca51
Copied from original issue: ochafik/nativelibs4java#230