Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using cl.exe and Ant to build JNI project

800358Aug 28 2008 — edited Sep 1 2008
Using Eclipse with a dual natured project and an Ant build.xml script to build both Java and C/C++. In the past, was using MinGW with success partly because CDT is designed around it. Now am stuck with a VS C++ and need to configure it in Ant. The task I'm using for COMPILING is:
<exec executable="${vcsetup}"></exec>
<exec executable="${cl}">
        <arg line="${ccFlags} /I${jdkinclude} /I${jdkwininclude} /I${vcInclude}  jsummarizer.cc"/>
</exec>
where:
vcsetup=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
cl = C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe
ccFlags = /nologo /c /MT
jdkinclude=C:\Program Files\Java\jdk1.6.0_06\include
jdkwininclude=C:\Program Files\Java\jdk1.6.0_06\include\win32
vcinclude=C:\Program Files\Microsoft Visual Studio 9.0\include

when the script is run everything goes well until the above section which produces:
[exec] Setting environment for using Microsoft Visual Studio 2008 x86 tools.
Result of running vcvars32.bat
[exec] Result: -1073741515
Result of cl command.
What does this mean? is it a cl error, and ant error or Java error
What is wrong with the Ant call to cl?
Jim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2008
Added on Aug 28 2008
3 comments
563 views