標籤: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位的連結檔案]