[MinGW]_[初级]_[64位的windres如何编译出32位的链接文件]
2014-11-05 18:34
871 查看
场景:
1. MinGW(TDM)出了64位的gcc,4.8.1,64位对编译64位的程序非常友好,但是对编译32位程序就需要做额外的工作了。
2. 比如用windres编译manifest,64位环境下默认是不行的,带configure或makefile的即使加了-m32都不会自动对windres设置为编译32位的。
这里就需要在configure或make增加一些参数了.
原文地址:
http://stackoverflow.com/questions/18805155/tdm-gcc-w64-script-to-change-windres-for-32bit
注意: 顺便说下4.8.1的64位gdb在debug编译的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 --help For 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位的链接文件]
- 在64位Ubuntu14.04LTS上编译和链接32位汇编程序(使用c标准库)需要如何配置配置环境
- [原创]交叉编译时,如何链接指定路径下的库文件
- 如何在linux 32位机器编译64位程序
- 嵌入式 GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- 如何在64位操作系统上使用masm进行编译链接和运行
- 如何在ubuntu14.04(64位)编译运行32位程序
- 【转】C#生成dll文件:如何用C#编译生成dll文件即动态链接库文件供其它程序调用
- 如何判断Unix系统的一个库文件是32位还是64位的
- 如何让32位编译的程序在64位系统中正常运行
- GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- 64位ubuntu下编译32位汇编程序(同时链接C库)
- GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- 如何判断Unix系统及库文件是32位还是64位的
- 如何用MinGW 命令行编译链接c/c++
- Installshield 64位操作系统下拷贝文件,如何重定向到32位的系统文件夹下
- C文件如何成为可执行文件(编译、链接、执行)——摘自《程序员的自我修养》
- 用mingw编译C++工程;程序里面的cout<<"aaa";cmd运行c++程序,aaa内容在控制台不显示,如何将aaa输出到控制台屏幕并将控制台内容写到一个文件中。
- GCC 64位程序的makefile条件编译心得——32位版与64位版、debug版与release版(兼容MinGW、TDM-GCC)
- 如何在64位Linux上编译安装32位wine。