[gdal-dev] SWIG java build error GDAL 1.5

Nidel, Mike mike.nidel at lmco.com
Tue Jul 8 09:24:22 EDT 2008


I'm building GDAL 1.5 from the branch, platform is Win32 with VC 9.0.

I'm getting the following error when running

nmake /f makefile.vc java

from GDAL_HOME/swig



   Creating library osrjni.lib and object osrjni.exp
        set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_14"
        C:\apache-ant-1.6.3\bin\ant
Files\Java\jdk1.5.0_14"" was unexpected at this time.
NMAKE : fatal error U1077: 'C:\apache-ant-1.6.3\bin\ant.BAT' : return
code '0xff
'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN
\nmake.EXE"' : return code '0x2'
Stop.


Has anyone else seen this?

If I remove the line

  set JAVA_HOME="$(JAVA_HOME)"


on line 14 of swig/java/makefile.vc then the build works fine.

I see that there is an attempt here to account for JAVA_HOME variables
with spaces (e.g. C:\Program Files\Java...). I did need to make a
separate modification to nmake.opt: change

JAVA_INCLUDE=-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32

to

JAVA_INCLUDE=-I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32"


Perhaps these changes should be checked into the branch?

thanks,

Mike


More information about the gdal-dev mailing list