vscode:ERROR: Unable to start debugging. Unexpected GDB output from command “-exec-run“.During ...

Windows系统,使用vscode编译C++时,报错:
ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139.
原因是其他软件(如anaconda、Qt)中的libstdc++ -6.dll和MinGW64中的libstdc++ -6.dll发生冲突。

具体原因是其他软件的环境变量,在MinGW64的环境变量的前面, 导致 gdb 调试时选择的 libstdc++ -6.dll 不是 mingw64\bin 中的,而是前面的环境变量中的该文件。

解决方法:
法一:

将动态库文件libstdc++ -6.dll,复制到当前项目生成的.exe可执行程序的所在目录。

法二:

将MinGW64的环境变量(mingw/bin)移动到,其他软件环境变量的前面。

法二,在某些情况下,可能会导致其他软件(anaconda、Qt)发生上述冲突,例如:在鼠标双击运行Qt生成的可执行程序时,Qt报错无法定位程序输入点xx于动态链接库xxx。

  • 8
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
About This Book, Unleash the power of Qt 5 with C++14Integrate useful third-party libraries such as OpenCVPackage and deploy your application on multiple platforms, Who This Book Is For, This book will appeal to developers and programmers who would like to build GUI-based applications. Knowledge of C++ is necessary and the basics of Qt would be helpful., What You Will Learn, Create stunning UIs with Qt Widget and Qt QuickDevelop powerful, cross-platform applications with the Qt frameworkDesign GUIs with the Qt Designer and build a library in it for UI previewHandle user interaction with the Qt signal/slot mechanism in C++Prepare a cross-platform project to host a third-party libraryBuild a Qt application using the OpenCV APIUse the Qt Animation framework to display stunning effectsDeploy mobile apps with Qt and embedded platforms, In Detail, Qt 5.7 is an application development framework that provides a great user experience and develops full-capability applications with Qt Widgets, QML, and even Qt 3D., This book will address challenges in successfully developing cross-platform applications with the Qt framework. Cross-platform development needs a well-organized project. Using this book, you will have a better understanding of the Qt framework and the tools to resolve serious issues such as linking, debugging, and multithreading. Your journey will start with the new Qt 5 features. Then you will explore different platforms and learn to tame them. Every chapter along the way is a logical step that you must take to master Qt. The journey will end in an application that has been tested and is ready to be shipped., Style and approach, This is an easy-to-follow yet comprehensive guide to building applications in Qt. Each chapter covers increasingly advanced topics, with subjects grouped according to their complexity as well as their usefulness. Packed with practical examples and explanations, Mastering Qt contains everything you need to take your applications to the next level.
在调试过程中,遇到"Unable to start debugging. Unexpected GDB output from command"的错误提示,以及后面跟随的具体错误信息,表明调试器无法启动并输出了意外的GDB指令的输出。引用和引用中提到的错误信息是GDB输出的意外内容和程序退出的错误代码。 另外,引用中提到的错误信息报告了在VScode编译C时出现了"Unable to start debugging. Unexpected GDB output from command“-environment-cd XXX”。XXX:Invalid argument."的错误,其中XXX指的是一个无效的参数。 回到你的问题,当出现"Unable to start debugging. Unexpected GDB output from command "-environment-cd D:\\桌面文件\\C "". D:\\桌面文件\\C : No such file or directory."的错误提示时,这意味着在指定的路径"D:\\桌面文件\\C "中找不到对应的文件或目录。 为解决该问题,你可以检查以下几点: 1. 确保路径"D:\\桌面文件\\C "中确实存在所需的文件或目录。可能是因为路径错误、文件名错误或文件不在指定的路径中导致的错误提示。 2. 确保在设置调试环境时,指定的路径是正确的,并且与实际所需的路径相匹配。 3. 检查调试器的配置和设置,确保没有配置错误或不兼容的选项。 总结来说,当出现"Unable to start debugging. Unexpected GDB output from command"的错误提示时,应该检查路径的正确性、文件是否存在以及调试器的配置和设置,以解决无法启动调试的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [VScode:ERROR: Unable to start debugging. Unexpected GDB output from command “-exec-run](https://blog.csdn.net/flyaaa123/article/details/125069936)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [VScode编译C++报错Unable to start debugging... Unexpected GDB output from command“-environment-cd XXX”](https://blog.csdn.net/qq_57438473/article/details/129349566)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值