【发布时间】:2020-10-09 04:32:51
【问题描述】:
我正在尝试使用添加 -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 提供了编译 32 位程序所需的所有东西
-
问题很可能不是MinGW。这是 Code::Blocks 认为所有这些文件所在的位置。
-
或者构建文件认为的位置。请注意,ld.exe(MinGW 的链接器)是报告所有问题的程序。
-
回滚。本网站采用问答形式(每个问题一个问题),如果您有新问题,请发布新问题
标签: c++ compiler-errors g++ codeblocks 32bit-64bit