GCC4.0 is released, but unfortunately Cygwin is now the latest GCC3.4.1. By downloading Cygwin installation package to use GCC4.0, it seems to wait for a while, how can I have to endure? I used to upgrade GCC in Linux, then can Cygwin can?
I followed the order of the GCC under Linux, and the result is possible, order, and in Linux.
1 First download the GCC4.0 package GCC-4.0.0.tar.gz at http://gcc.gnu.org.
2 Using WinRAR to extract GCC-4.0.0.tar.gz under installation directory (C: / TEMP / GCC-4.0.0), which is easier than in Linux, huh, huh.
3 Set up the target directory (C: / Temp / Build).
4 Configure the installation parameters, configured by configureing in the installation directory in Cygwin, because I just test, too much parameter, I have no choice, just set up the installation directory. ($ Cd /cygdrive/c/temp/build@cygdrive/c/temp/gcc-4.0.0/configure --prefix = / lib / gcc / i686-pc-cygwin / 4.0.0)
5 Compile, run in Cygwin
$ cd / cygdrive / c / temp / build
$ Make
Just take an hour
6 installation, need system administrator's permissions users
Run in Cygwin
$ cd / cygdrive / c / temp / build
$ make Install
Install here is completed, basically and Linux is almost, it feels easy.
Things you want to do:
A Since the GCC command is needed in Windows environment, use ln in CygWin just create a shortcut, there is no way to put in /lib/gcc/i686-pc-cygwin/4.0.0/bin GCC, G , GCJ All copied to / bin, covering the previous things, this method is not very good, but this is the same, huh, huh.
B put /LIB/gcc/i686-pc-cygwin/4.0.0/lib all files copy to / lib
c Test GCC4.0.0 with the previous C program.
/cygdrive/c/temp/gcc-4.0.0/configure --prefix = / usr --Exec-prefix = / --Libexecdir = / lib / gcc-lib --infodir = / usr / share / info --mandir = / usr / share / man --with-win32-nlsapi = unicode