繁体   English   中英

CodeBlocks 为 32 位计算机编译程序

[英]CodeBlocks compile program for 32bit computer

我正在尝试使用添加 -m32 参数的 CodeBlock 默认 MinGW 编译器为 32 位系统编译我的代码,但我遇到了很多错误:

||=== Build: Debug in cONfuSioN (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lstdc++|
ld.exe||cannot find -lmingw32|
ld.exe||cannot find -lgcc|
ld.exe||cannot find -lgcc_eh|
ld.exe||cannot find -lmoldname|
ld.exe||cannot find -lmingwex|
ld.exe||cannot find -lmsvcrt|
ld.exe||cannot find -lpthread|
ld.exe||cannot find -ladvapi32|
ld.exe||cannot find -lshell32|
ld.exe||cannot find -luser32|
ld.exe||cannot find -lkernel32|
ld.exe||cannot find -liconv|
ld.exe||cannot find -lmingw32|
ld.exe||cannot find -lgcc|
ld.exe||cannot find -lgcc_eh|
ld.exe||cannot find -lmoldname|
ld.exe||cannot find -lmingwex|
ld.exe||cannot find -lmsvcrt|
||error: ld returned 1 exit status|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|

编辑:我修好了

大多数 mingw.org 和 mingw-w64 版本仅支持 32 位或 64 位。 32 位目标的工具链分发与 64 位目标完全不同。

您可以并排安装两个工具链,但不能有一个带有目标开关的工具链。

(我听说有人做过 mingw-w64 的多目标单工具链发行版,但很可能这不是你已经安装的)。

听起来您只安装了 64 位目标版本。 您还可以考虑安装 mingw-w64 的 32 位目标工具链。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM