[MinGW]_[初級]_[64位的windres如何編譯32位的連結檔案]

來源:互聯網
上載者:User

標籤:mingw   windres   tdm   64   32   


情境:

1.   MinGW(TDM)出了64位的gcc,4.8.1,64位對編譯64位的程式非常友好,但是對編譯32位程式就需要做額外的工作了。

2.  比如用windres編譯manifest,64位環境下預設是不行的,帶configure或makefile的即使加了-m32都不會自動對windres設定為編譯32位的。

這裡就需要在configure或make增加一些參數了.


./configure RCFLAGS="--output-format=coff --target=pe-i386" ........

make RCFLAGS="--output-format=coff --target=pe-i386" ........

原文地址:

http://stackoverflow.com/questions/18805155/tdm-gcc-w64-script-to-change-windres-for-32bit

To see all possble windres parameters, you can request help:    x86_64-w64-mingw32-windres.exe --helpFor Windows 32 bit format you need coff format with pe-i386 target.Basically, you have to add -F pe-i386 (or --target=pe-i386) after -O coff flag to your command line if you generate it manually.In GNU autotools it's about the RCFLAGS. So if there's some configure script, just add    ./configure RCFLAGS="--output-format=coff --target=pe-i386" ........

注意: 順便說下4.8.1的64位gdb在debug編譯的32位程式會崩潰.

[MinGW]_[初級]_[64位的windres如何編譯32位的連結檔案]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.