1 下载Swig for Windows:http://www.swig.org/download.html
2 解压 .zip 文件到目录,比如:D:backupsoftware
3 添加环境变量到path, 比如: D:backupsoftwareswigwin-2.0.9
4 添加环境变量 JAVA_INCLUDE 和 JAVA_BIN
JAVA_INCLUDE : Set this to the directory containing jni.h
JAVA_BIN : Set this to the bin directory containing javac.exe
Example using JDK1.3:
JAVA_INCLUDE: D:jdk1.3include
JAVA_BIN: D:jdk1.3bin
Note:D:backupsoftwareswigwin-2.0.9 下面有 swig.exe 文件,注意这个目录。
简单测试安装是否成功:
打开Dos,在命令行执行: swig --help, 显示 Target Language Options即表明安装成功。