vscode collect2.exe: error: ld returned 1 exit status
时间: 2023-09-25 12:15:00 浏览: 185
在使用VS Code编译C语言时,遇到"collect2.exe: error: ld returned 1 exit status"错误。这个错误通常是链接步骤中出现问题导致的。有几种方法可以尝试解决这个问题。
首先,检查代码是否有关键字拼写错误的情况。有时候拼写错误会导致链接错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [collect2.exe: error: ld returned 1 exit status 解决方法](https://blog.csdn.net/qq_34928811/article/details/119337195)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [VSCode 编写 C++ 运行时出现”collect2.exe: error: ld returned 1 exit status“问题的相关解决方法](https://blog.csdn.net/liu_feng_zi_/article/details/102489769)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文