Monday, October 6, 2008
Friday, October 3, 2008
Cygwin MinGW(MSYS, Dev-C++) DJGPP
今天在找Windows下轻量级IDE时到了gcc主页,里面给出的能在Windows下运行的gxx包括:
DOS:DJGPP
Microsoft Windows: 1. The Cygwin project; 2. The MinGW project.
Cygwin模拟linux环境。它自己有一个cygwin1.dll(两兆多吧),linux程序在linux系统调用时直接到这个dll中去找。总的来说Cygwin很大但功能较强大。
MinGW的子项目MSYS和Cygwin差不多,相对于Cywin来说功能弱一些但小多了。它是通过把系统调用转为Windows API的调用。(我的理解:MSYS直接把linux调用转API,而Cygwin在那个dll中一起转)
MinGW应该是一个工具集,它用gxx把程序在Windows平台上编译成Windows上的可执行文件。有相应的IDE: MinGW Developer Studio,比起vs来说小得多,安装后60多M,运行时5M多,用起来感觉和vs差不多。开头我还以为是编译linux的C程序的,后来发现不能,而且只能编译Windows下的程序,可以调用Windows API。
而Dev-C++是一个IDE,默认以MinGW作为编译器,感觉和MinGW Developer Studio差不多,但一些默认配置参数都要手动进行,刚装好后不能直接用,而且卸载选项都找不到,麻烦!
以下是Cygwin官方介绍:
What Is Cygwin?
# Cygwin is a Linux-like environment for Windows. It consists of two parts: A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
# A collection of tools which provide Linux look and feel.
The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE.
Note that the official support for Windows 95, Windows 98, and Windows Me will be discontinued with the next major version (1.7.0) of Cygwin.
What Isn't Cygwin?
# Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.
# Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.
以下是MinGW项目官方介绍:
MinGW: A collection of freely available and freely distributable Windows specific header files and import libraries, augmenting the GNU Compiler Collection, (GCC), and its associated tools, (GNU binutils). MinGW provides a complete Open Source programming tool set which is suitable for the development of native Windows programs that do not depend on any 3rd-party C runtime DLLs.
MSYS: A Minimal SYStem providing a POSIX compatible Bourne shell environment, with a small collection of UNIX command line tools. Primarily developed as a means to execute the configure scripts and Makefiles used to build Open Source software, but also useful as a general purpose command line interface to replace Windows cmd.exe.
最后来说说DJGPP。它是在DOS下运行的,短小精悍,当然也可以集成IDE(RHIDE还是专门针对DJGPP的IDE呢)。它里面包括gxx编译器等,可以自己手动添加所需的内容。在Windows下可以在命令行中运行,生成Windows下的可执行文件。
以下是官方介绍:
DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS. It includes ports of many GNU development utilities. The development tools require a 80386 or newer computer to run, as do the programs they produce. In most cases, the programs it produces can be sold commercially without license or royalties.
Labels: Coding, Operation and Maintenance, Windows