您的位置:首页 > 其它

My GCC Environment on Windows Vista

2008-05-12 09:10 363 查看
http://blogs.msdn.com/allen/archive/2008/05/05/my-gcc-environment-on-windows-vista.aspx

GCC homepage: http://gcc.gnu.org MinGW homepage: http://www.mingw.org
MingGW packages download page: http://sourceforge.net/project/showfiles.php?group_id=2435 MinGW: A native Win32 port of the GNU Compiler Collection (GCC), with freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality.

The minimal packages needed:
MinGW Runtime: Core headers and libraries
Windows API: Headers and libraries needed for building win32 apps.
MinGW/GCC: GCC core, GCC g++, GCC Object C: Currently offical GCC release is 4.3.0 but in MinGW it's still in Alpha so here I choose to use 3.4.5
MinGW/GNU Binutils: Is a collections of GNU binary tools such as ld.exe the linker, as.exe the assembler. More details are at http://www.gnu.org/software/binutils/
Optional Tools
GNU Make
GNU GDB (debugger)

Installation:
1. Create a MinGW root directory, e.g. D:/MinGW
2. Extract all those packages to the root directory
3. Create a batch file to set the environment path. e.g. below, and save this file at D:/Coding/Utilities/gccenv.bat
    path "D:/MinGW/bin"
    cls
4. Create a shortcut like this: %comspec% /k ""D:/Coding/Utility/gccenv.bat"" x86

To Verify:
D:/Coding>gcc --version
gcc (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息