0
我有一個用於編譯源代碼的常見GIS庫(GDAL)的Java綁定的makefile。主要可執行文件的編譯確實有效,但綁定不能編譯。也許有人對我有一個建議。通過Swig進行Java綁定的Makefile失敗
我設置的所有路徑在我nmake.opt文件:
###############################################################################
# Location to install .exe, .dll and python stuff
# Edit as required. GDAL_HOME is used for convenience here,
# but this particular relative organization is not mandatory.
# But the paths *should* be absolute (relative paths mess up in submakefiles).
!IFNDEF GDAL_HOME
GDAL_HOME = "C:\gdal-2.1.3\bld"
!ENDIF
!IFNDEF BINDIR
BINDIR = $(GDAL_HOME)\bin
!ENDIF
!IFNDEF PLUGINDIR
PLUGINDIR = $(BINDIR)\gdalplugins
!ENDIF
!IFNDEF LIBDIR
LIBDIR = $(GDAL_HOME)\lib
!ENDIF
!IFNDEF INCDIR
INCDIR = $(GDAL_HOME)\include
!ENDIF
!IFNDEF DATADIR
DATADIR = $(GDAL_HOME)\data
!ENDIF
!IFNDEF HTMLDIR
HTMLDIR = $(GDAL_HOME)\html
!ENDIF
# Set this to the installed directory containing python. If you don't
# have python just let it point to a directory that does not exist (as now).
!IFNDEF PYDIR
PYDIR = "C:\Software\Python24"
!ENDIF
# Set the location of your SWIG installation
!IFNDEF SWIG
SWIG = "C:\OSGeo4W64\apps\swigwin\swig.exe"
!ENDIF
# SWIG Java settings
!IFNDEF JAVA_HOME
JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_121"
!ENDIF
!IFNDEF ANT_HOME
ANT_HOME="C:\OSGeo4W64\bin\apache-ant-1.10.1"
!ENDIF
JAVADOC=$(JAVA_HOME)\bin\javadoc
JAVAC=$(JAVA_HOME)\bin\javac
JAVA=$(JAVA_HOME)\bin\java
JAR=$(JAVA_HOME)\bin\jar
JAVA_INCLUDE= -I $(JAVA_HOME)\include -I $(JAVA_HOME)\include\win32
這以後JAVA_INCLUDE似乎導致與CL.EXE錯誤:
cl : Befehlszeile warning D9024 : Unbekannter Typ der Quelldatei "Files\Java\jdk1.8.0_121\include", Objektdatei wird angenommen.
cl : Befehlszeile warning D9027 : Quelldatei "Files\Java\jdk1.8.0_121\include" wird ignoriert.
cl : Befehlszeile warning D9024 : Unbekannter Typ der Quelldatei "Files\Java\jdk1.8.0_121\include\win32", Objektdatei wird angenommen.
cl : Befehlszeile warning D9027 : Quelldatei "Files\Java\jdk1.8.0_121\include\win32" wird ignoriert.
ogr_wrap.cpp
c:\gdal-2.1.3\swig\java\ogr\ogr_wrap.cpp(159): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "jni.h": No such file or directory
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.EXE"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EXE"": Rückgabe-Code "0x2"Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.EXE"": Rückgabe-Code "0x2"Stop.
的路徑是正確的,但爲什麼它返回一個未知的對象類型?我犯了什麼錯誤?