bodensx / jnaerator

Automatically exported from code.google.com/p/jnaerator
0 stars 0 forks source link

Null pointer exception when using a visual studio solution #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I try to generate interfaces for a whole solution
2. I run "java -jar jnaerator-0.9.5.jar sundials.sln"
3. And it results in an exception

What is the expected output? What do you see instead?
They output is:
Dec 29, 2010 6:21:11 PM com.ochafik.admin.visualstudio.VisualStudioUtils getProp
INFO: [environment] ProgramFiles(x86)=C:\Program Files (x86)
Dec 29, 2010 6:21:11 PM com.ochafik.admin.visualstudio.VisualStudioUtils getProp
INFO: [environment] VISUAL_STUDIO_HOME=C:\Program Files (x86)\Microsoft Visual 
Studio 9.0
Dec 29, 2010 6:21:11 PM com.ochafik.admin.visualstudio.VisualStudioUtils getProp
INFO: [environment] ProgramFiles(x86)=C:\Program Files (x86)
Dec 29, 2010 6:21:11 PM com.ochafik.admin.visualstudio.VisualStudioUtils getProp
INFO: [environment] WINDOWS_SDK_HOME=C:\Program Files (x86)\Microsoft 
SDKs\Windows\v6.0A
Dec 29, 2010 6:21:11 PM com.ochafik.admin.visualstudio.VisualStudioUtils getProp
INFO: [environment] VISUAL_STUDIO_INCLUDES=C:\Program Files (x86)\Microsoft 
Visual Studio 9.0\VC\include;C:\Program Files (x86)\Microsoft 
SDKs\Windows\v6.0A\Include
Error parsing arguments :
sundials.sln
Finished with errors.
java.lang.NullPointerException
    at com.ochafik.lang.jnaerator.JNAeratorConfigUtils.readProjectConfig(JNAeratorConfigUtils.java:390)
    at com.ochafik.lang.jnaerator.JNAerator$1.parsedFile(JNAerator.java:565)
    at com.ochafik.lang.jnaerator.JNAerator$1.parsed(JNAerator.java:400)
    at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:89)
    at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:290)
    at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:171)

What version of the product are you using? On what operating system?

Is the problem still present in the latest SVN version ? (you can easily
build from sources with these instructions :
http://code.google.com/p/javacl/wiki/Build)

Please provide any additional information below.
I tried to generate a java interface for the Sundials 
(https://computation.llnl.gov/casc/sundials/main.html) library which is written 
in C. Following their installation instructions and using CMake, I created a 
visual studio solution. Then I compiled it for Windows with Visual Studio 2010. 
I then tried to use the aforementioned command to generate the java interface 
but it failed with the given exception. I can also provide the complete 
solution with the code and built dlls if needed (somewhere around 100mb I 
guess).

Original issue reported on code.google.com by darko.ce...@gmail.com on 29 Dec 2010 at 5:35

GoogleCodeExporter commented 8 years ago
Hello,

JNAerator was never debugged with VS 2010 solutions, so there might be some 
work to do...
Will investigate ASAP.

Cheers
--
zOlive

Original comment by olivier.chafik@gmail.com on 18 Feb 2011 at 5:19

GoogleCodeExporter commented 8 years ago
VisualStudioUtils.java does not support Microsoft Visual Studio 10.0. Now, it 
only try to setup the environment from the following path:
    VISUAL_STUDIO_INCLUDES=C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include

After upgrading from Visual Studio 10.0, all the files under the Include folder 
are moved to the new version place.  The path should be:

    VISUAL_STUDIO_INCLUDES=C:\Program Files\Microsoft Visual Studio 10.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include

Original comment by LiuYJe...@gmail.com on 24 Aug 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Hi,
This issue moved to Github :
https://github.com/ochafik/nativelibs4java/issues/154

Thanks for not updating this page anymore and adding further comments on Github.
Cheers
--
zOlive

Original comment by olivier.chafik@gmail.com on 1 Sep 2011 at 7:26