[size=medium]
在windows上开发jni,有两种选择cygwin或者MinGW,但用cygwin开发jni貌似有一些莫名其妙的问题,网上找了好久也没解决办法,只是说换MinGW没问题。
不过用cygwin开发local c++程序是没有问题的。
参考:
[url]http://aofengblog.blog.163.com/blog/static/6317021201011972451154/[/url]
[url]http://915269970.blog.51cto.com/4907983/845704[/url]
1. 下载MinGW(Minimalist GNU for Windows)
这个版本的MinGW安装器比较简单好用[url]http://dl.iteye.com/topics/download/13edf946-f140-33f0-a0a1-2fd4e035c4e0[/url]
2. 安装MinGW:(c, c++编译器和MinGW Basic System为必装)
[img]http://dl2.iteye.com/upload/attachment/0090/1046/5736c70f-3de7-3509-91eb-851df50dbc03.png[/img]
安装完后开始菜单中将多出这两项:
[img]http://dl2.iteye.com/upload/attachment/0090/1048/837d838d-c3c9-3c19-a719-af56112d95a1.png[/img]
3. 点击MinGW Shell安装make:
输入:mingw-get install gcc g++ mingw32-make
[img]http://dl2.iteye.com/upload/attachment/0090/1050/2f07956a-78c6-36c5-8a1a-9cddf3f983da.png[/img]
MinGW下的make文件名为mingw32-make.exe,为了防止Eclipse可能按照默认方式找不到make.exe的问题:make安装完后,拷贝MinGW/bin下的mingw-make.exe并重命名为make.exe
4. 配置环境变量,将MinGW/bin添加到Path变量下,如:D:\Program\mingw\bin添加到Path中
[img]http://dl2.iteye.com/upload/attachment/0090/1052/11f4b864-5a1c-300c-8510-4b487020e1b3.png[/img]
5. 验证MinGW的安装:(先进入cmd命令行)
[img]http://dl2.iteye.com/upload/attachment/0090/1054/909c3f40-ef44-3ab1-9cd5-d6dda03d9309.png[/img]
[/size]
在windows上开发jni,有两种选择cygwin或者MinGW,但用cygwin开发jni貌似有一些莫名其妙的问题,网上找了好久也没解决办法,只是说换MinGW没问题。
不过用cygwin开发local c++程序是没有问题的。
参考:
[url]http://aofengblog.blog.163.com/blog/static/6317021201011972451154/[/url]
[url]http://915269970.blog.51cto.com/4907983/845704[/url]
1. 下载MinGW(Minimalist GNU for Windows)
这个版本的MinGW安装器比较简单好用[url]http://dl.iteye.com/topics/download/13edf946-f140-33f0-a0a1-2fd4e035c4e0[/url]
2. 安装MinGW:(c, c++编译器和MinGW Basic System为必装)
[img]http://dl2.iteye.com/upload/attachment/0090/1046/5736c70f-3de7-3509-91eb-851df50dbc03.png[/img]
安装完后开始菜单中将多出这两项:
[img]http://dl2.iteye.com/upload/attachment/0090/1048/837d838d-c3c9-3c19-a719-af56112d95a1.png[/img]
3. 点击MinGW Shell安装make:
输入:mingw-get install gcc g++ mingw32-make
[img]http://dl2.iteye.com/upload/attachment/0090/1050/2f07956a-78c6-36c5-8a1a-9cddf3f983da.png[/img]
MinGW下的make文件名为mingw32-make.exe,为了防止Eclipse可能按照默认方式找不到make.exe的问题:make安装完后,拷贝MinGW/bin下的mingw-make.exe并重命名为make.exe
4. 配置环境变量,将MinGW/bin添加到Path变量下,如:D:\Program\mingw\bin添加到Path中
[img]http://dl2.iteye.com/upload/attachment/0090/1052/11f4b864-5a1c-300c-8510-4b487020e1b3.png[/img]
5. 验证MinGW的安装:(先进入cmd命令行)
[img]http://dl2.iteye.com/upload/attachment/0090/1054/909c3f40-ef44-3ab1-9cd5-d6dda03d9309.png[/img]
[/size]