cygwin編譯的win32程序不需要cygwin1.dll庫的方法(2)

新版本的gcc已經不支持 -mno-cygwin了。在cygwin中編譯(1)中的代碼,會出現如下的信息:

gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.

提示說要可以用MinGW來代替,gcc好人性化,贊!


google了下,國內的大部分都是說加上-mno-cygwin就可以不依賴cygwin1.dll庫了,但是並沒有說新版本的gcc不支持-mno-cygwin編譯選項了。


去MinGW網站http://www.mingw.org/,下載在線安裝包mingw-get-inst-20110530.exe,這樣安裝的好處是不需要自己去設置環境變量,直接下一步下一步,選擇安裝gcc,g++,msys base system等包,安裝完成就可以在windows下使用gcc和g++編譯器了。


轉載自mingw官網

MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs. (Itdoes depend on a number of DLLs provided by Microsoft themselves, as components of the operating system; most notable among these is MSVCRT.DLL, the Microsoft C runtime library. Additionally, threaded applicationsmust ship with a freely distributable thread support DLL, provided as part of MinGW itself).

發佈了34 篇原創文章 · 獲贊 9 · 訪問量 19萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章