Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2209663
  • 博文数量: 1058
  • 博客积分: 10018
  • 博客等级: 上将
  • 技术积分: 12641
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-23 19:24
文章分类

全部博文(1058)

文章存档

2010年(108)

2009年(736)

2008年(214)

我的朋友

分类: C/C++

2009-06-24 00:01:10

MinGW(Minimalist GNU for Windows),又称Mingw32,是将GNU开发工具移植到Win32平台下的产物,包括一系列头文件(Win32API)、库和可执行文件。 MinGW是从Cygwin(1.3.3版)基础上发展而来,但是用MinGW开发的程序不需要额外的第三方DLL支持就可以直接在Windows下运 行,而且也不一定必须遵从GPL许可证。

下载:

NEW FEATURES SINCE MINGW GCC 3.4

Windows-specific:--

- Shared libgcc: If all modules are linked with -shared-libgcc,
  exceptions can be thrown across DLL boundaries.  Note that this is
  the default for all languages other than C.

- Shared libstdc++: Compile with -D_GLIBCXX_DLL and add -lstdc++_s to
  your link flags to link against a DLL version of libstdc++.

- Zero cost exceptions: New exception model Dwarf only has performance
  penalty when being thrown.  The old model, SJLJ, is no longer
  available.

- Thread local storage support: The  __thread keyword is honoured.

- Translations into your language! See MINGWsharelocale for a list of
  codes.  Set the LANG environment variable to the code of your
  preferred language.

  $ export LANG=es
  $ gcc
  gcc.exe: no hay ficheros de entrada

In general:--

- New language: Java 1.5, using the Eclipse front end

- New language: Objective-C++, intended to bridge C++ and Objective-C
  code

- Improved optimisation: SSA optimisation framework, IPA support,
  autovectorization of loops, new register allocator, new instruction
  scheduler, and more

- Support for some parts of the upcoming new version of C++

- Support for new IA-32 processors and SIMD instruction sets

- Support for TR1 and experimental support for the next C++ standard

- Fortran language rewritten to support new standards

- Improved debugging information: Dwarf-2 debugging is now the default.
  Make sure to get the latest GDB version for the best debugging
  experience.

- OpenMP support

For more information, see <



GENERAL NOTES

- Throwing exceptions through foreign frames

Previous versions of GCC would blindly unwind through all foreign frames.
If these frames did not have valid unwind information, perhaps because
they were written in a language that does not have exceptions, program
data structures might be left in an incoherent state, leading to
mysterious bugs including data loss and program crashes.  From now on,
GCC will only unwind through frames if it can be determined that the
functions understand exceptions.  Currently, functions that use either
Dwarf-2 EH or SEH are supported.

Unfortunately, in i386 versions of Windows, there is no reliable way
for the compiler or runtime unwinder to tell if a function supports
unwinding with SEH.  Consequently, it is necessary to add the seh_aware
decorator to the declarations of foreign SEH functions that exceptions
might be thrown through.

If you intend to throw exceptions through Windows API callbacks, you
will need to add __attribute__((seh_aware)) to the declaration of the
corresponding API function.  This is only a temporary measure, as a
future version of w32api from MinGW.org will have some sort of way of
adding this annotation automatically.  Note that it is not necessary to
add this attribute to the callbacks themselves, or any other function
definition that is compiled by GCC; it is only necessary for foreign
functions.

- Dynamic linking with libgcc_s_dw2-1.dll

Dynamic linking with libgcc_s_dw2-1.dll is necessary to throw
exceptions between different modules, such as between two DLLs or a
DLL and an EXE.  Consequently, it is the default for all languages
other than C.  To disable this dynamic linking, use -static-libgcc.
To enable this dynamic linking in C, use -shared-libgcc.

KNOWN ISSUES

- The Java compiler GCJ is somewhat broken.  Compiling with
  -static-libgcj works better than the default of dynamically linking.

- libstdc++_s is only partially implemented.

- GRAPHITE is not supported due to various bugs.  This is being corrected
  for the next release.

阅读(503) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~