尝试让 TDM-GCC(4.7.1) 在 XP SP3 上运行 - 我现在只需要一个 c++ 32 位版本。看来 Windres 的格式不正确,我的 .rc 文件构建失败:
x86_64-w64-mingw32-g++.exe -Wall -m32 -s -D_M_X86 -DBUILD_DLL -DNDEBUG -c C:\SynthEditSDK\TD_SV\SV.cpp -o obj\Release\TD_SV\SV.o
windres.exe -J rc -O coff -i C:\SYNTHE~1\TD_SV\TD_SV.rc -o obj\Release\TD_SV\TD_SV.res
x86_64-w64-mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTD_SV -Wl,--out-implib=bin\Release\libTD_SV -Wl,--dll obj\Release\se_sdk3\mp_sdk_audio.o obj\Release\se_sdk3\mp_sdk_common.o obj\Release\TD_SV\SV.o obj\Release\TD_SV\TD_SV.res -o bin\Release\TD_SV.sem -Wl,--kill-at -static-libgcc -m32 -luser32
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `obj\Release\TD_SV\TD_SV.res' is incompatible with i386 output
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 2 warnings (0 minutes, 2 seconds)
我的资源文件(TD_SV.rc)似乎是错误:
TD_SV.res' is incompatible with i386 output
我已经谷歌搜索了几个小时,最接近的解决方案就在这里:
http://backyardcode.com/
他建议这个脚本 - 但我不知道如何更改它以满足我的需要 - 任何帮助表示赞赏!
$rescomp [[
if(GetProjectManager().GetActiveProject().GetActiveBuildTarget().Matches(_T("Debug32"))
||
GetProjectManager().GetActiveProject().GetActiveBuildTarget().Matches(_T("Release32")))
{ print(_T("-D USE_X86_MODE -F pe-i386")); } ]] -i $文件 -J rc -o
$resource_output -O coff $res_includes
另外 - 是否有任何 TDM-GCC(预构建/安装程序类型)替代方案?我真正需要的是带有石墨选项的 32 位版本。还使用 CodeBlocks IDE。
问候
安德鲁
要查看所有可能的 Windres 参数,您可以请求帮助:
x86_64-w64-mingw32-windres.exe --help
对于 Windows 32 位格式,您需要coff格式化为pe-i386 target.
基本上,你必须添加-F pe-i386 (or --目标=pe-i386) after -O coff如果您手动生成它,请标记到您的命令行。
在 GNU 自动工具中,它是关于RCFLAGS。因此,如果有一些配置脚本,只需添加
./configure RCFLAGS="--output-format=coff --target=pe-i386" ........
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)