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 位目标工具链。
我正在尝试使用添加 -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 位目标工具链。