MinGW5.1.6.exe 比现在 MinGW/GCC 4.5.2的ming-get好用得多。但纠结的是 MinGW5.1.6的核心是 gcc3.4.5。
这个版本有个问题,遇到utf-8 BOM的 会在前三个字节上弄不清状况。
ming-get-inst 有些问题,不能把mingw要安装的东西装上。甚至连 gcc.exe都没有装上。还要手动安装 mingw32-make。以及mingw32-make.exe 依赖的libintl-8.dll 和 libintl-8.dll依赖的 libiconv-2.dll。
搞定这些之后,发现编译的小程序缺少运行的动态库libgcc_s_dw2-1.dll。加上后又报缺少libstdc++6.dll。都通过
mingw-get 的命令帮助提示加到 bin中。 转而google了 相关文章。有一篇
http://forums.codeblocks.org/index.php?topic=12183.15 写道
"libstdc++-6.dll" is provided by MinGW/GCC. You can use the "-static-libstdc++" swith for the linker to avoid this message, and have it directly included in "rt.exe".
Same for "libgcc_s_dw2-1.dll", use the linker switch "-static-libgcc".
Same for "libgcc_s_dw2-1.dll", use the linker switch "-static-libgcc".
http://lists-archives.org/mingw-users/16829-mingw-gcc-4-5-0-released.html 写道
General Notes:
--------------
* 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. To disable this, use
-static-libgcc.
* Shared libstdc++: By default, C++ modules are linked with a DLL
version of libstdc++. To use the static version, use the
-static-libstdc++ flag.
* Translations into your language! See share\locale for a list of
codes. Unpack the translation archive in c:\MinGW and set the LANG
environment variable to the code of your preferred language.
* Inline functions decorated with __declspec(dllexport) are now always
generated and included in object files. This also applies to methods
defined in classes decorated with __declspec(dllexport).
This may cause a general increase in object size, since gcc generates
copies of each dllexport'd inline function in all object files whose
source includes the header defining the function.
Known Issues:
-------------
* The Java language is absent, pending resolution of build issues.
* When linking C++ modules with shared libstdc++ (the default), the
linker may warn about activating auto-import. The workaround is to
add one of the following flags:
a) -Wl,--enable-runtime-pseudo-reloc-v2
The warning is still printed, but is now harmless.
b) -Wl,--enable-auto-import
Actually does what the warning suggests.
c) -static-libstdc++
Avoids creating the issue in the first place.
d) none of the above.
You may get a 0xc0000005 error at runtime.
--------------
* 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. To disable this, use
-static-libgcc.
* Shared libstdc++: By default, C++ modules are linked with a DLL
version of libstdc++. To use the static version, use the
-static-libstdc++ flag.
* Translations into your language! See share\locale for a list of
codes. Unpack the translation archive in c:\MinGW and set the LANG
environment variable to the code of your preferred language.
* Inline functions decorated with __declspec(dllexport) are now always
generated and included in object files. This also applies to methods
defined in classes decorated with __declspec(dllexport).
This may cause a general increase in object size, since gcc generates
copies of each dllexport'd inline function in all object files whose
source includes the header defining the function.
Known Issues:
-------------
* The Java language is absent, pending resolution of build issues.
* When linking C++ modules with shared libstdc++ (the default), the
linker may warn about activating auto-import. The workaround is to
add one of the following flags:
a) -Wl,--enable-runtime-pseudo-reloc-v2
The warning is still printed, but is now harmless.
b) -Wl,--enable-auto-import
Actually does what the warning suggests.
c) -static-libstdc++
Avoids creating the issue in the first place.
d) none of the above.
You may get a 0xc0000005 error at runtime.