from: http://blog.sina.com.cn/s/blog_492abb0f0100fwnu.html
MinGW - Minimalist GNU for Windows
MinGW - A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.
mingw 是windows版本的gnu c/c++工具集 主要包括编译器gcc,连接器make,调试器gdb
MinGW 官方网站为 http://www.mingw.org
可参考最新版本,为如下地址:
http://sourceforge.net/projects/mingw/
安装软件:
1,mingwrt-3.15.1,通过网络安装,将所有的东西都装在C:\MinGW(默认目录),但是最好改成c:\mingw 这样可以同msys更好的结合
下载地址:http://sourceforge.net/projects/mingw/
2,Visual-MinGW 0.59,安装完毕后,Visual-MinGW会提示让你寻找compile目录,这时候选mingw安装目录(默认是C:\MinGW)即可
下载地址:http://visual-mingw.sourceforge.net/
3,mingw32-make-3.80.0-3.exe
下载地址:http://sourceforge.net/project/downloading.php?groupname=mingw& filename=mingw32-make-3.80.0-3.exe&use_mirror=nchc
4,配置环境变量,复制“mingw32-make.exe”增加“make.exe”
5,打开Visual-MinGW,想写点啥就写点啥吧,finish
测试:
(1)在cmd中执行下make命令(如c:\mingw\bin>make.exe),如果出现“***No targets specfied and no make file found stop”,设置成功。
(2)在cmd中输入“gcc -v”,如果屏幕出现“gcc不是内部命令或外部命令,也不是可运行的程序或批处理文件。”表示环境变量设定有问题。
如果出现如下显示,表示设定成功。
H:\>mingw32-make -version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-mingw32
H:\>make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-msys
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.