GNU compilers (gcc/g++/g77) are robust but not highly optimized for
the Win32 Platform. There are two major distributions of these compilers under the
Cygwin
and MinGW
initiatives.
While both distributions use the same compiler sources from a free and open project
they are linked to different runtime environments. The Cygwin distribution offers
higher compatibility with the UNIX environment and it is recommended for porting
large and complex Unix projects to the Win2K/WinXP environment. Unfortunately there
is a price to be paid. By default, the executables are linked to a specific
emulation layer - "cygwin1.dll". Objects which reference the Microsoft
runtime libraries cannot be linked with objects that reference the cygwin1.dll due
to multiply-defined symbols. A consultant can help you with possible work-arounds
to this problem.
The MinGW distribution links directly to the Microsoft runtime environment ("msvcrt.dll")
but offers less Unix compatibility. To access the MinGW compiler give the flag -mno-cygwin
to gcc/g77.
When and why to use GNU compilers at CTC:
- when porting a UNIX project to the Win32 platform is very complicated
- when cross platform maintenance with makefiles is a must
- the compilers are free
Why to avoid using them:
- the software has limited support from the CTC staff
- there is no good integration with commercial products (mostly lack of support)
- possibly lower performance compared to Intel compilers
- the Fortran compiler is supported only at the level of the F77 standard (but F95
support is being added to GCC 4)
- codes compiled with the cygwin compiler need to have the cygwin1.dll library around
at runtime