TLS1217 2023-03-05 00:17 采纳率: 100%
浏览 37
已结题

vscode无法运行c++文件

vscode目前写过c和python,遇到的问题多多少少按网上教程都解决了。
但是在配置c++的时候一直无法运行代码,而且json文件怎么调(各种网上的调试方法都试过)都无法运行c++文件。
目前如果我新建一个文件夹,用vscode打开,创建c++文件,写几行代码运行,调试控制台会出现以下报错。

=thread-group-added,id="i1"
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
[New Thread 14392.0x54b8]
[New Thread 14392.0x4538]
[New Thread 14392.0x4224]

Thread 1 hit Breakpoint 1, main () at D:\3Work\VS Code Project\1\1.cpp:6
6        cout << "test";
Loaded 'C:\WINDOWS\SYSTEM32\ntdll.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\kernel32.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\KernelBase.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\SYSTEM32\apphelp.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\ucrtbase.dll'. Symbols loaded.
Loaded 'D:\3Work\mingw64\bin\libstdc++-6.dll'. Symbols loaded.
Loaded 'D:\3Work\mingw64\opt\bin\libgcc_s_seh-1.dll'. Symbols loaded.
[Thread 14392.0x4224 exited with code 0]
[Thread 14392.0x54b8 exited with code 0]
[Thread 14392.0x4538 exited with code 0]
[Inferior 1 (process 14392) exited normally]
The program 'D:\3Work\VS Code Project\1\1.exe' has exited with code 0 (0x00000000).
  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2023-03-05 02:04
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 3月15日
  • 已采纳回答 3月7日
  • 创建了问题 3月5日

悬赏问题

  • ¥15 微信夜间被转走了1w对,当天手机剪切板里就出现了这个乱码,有铁子可以看看是啥吗可以
  • ¥50 跑通github上的代码 深度学习 pytorch
  • ¥50 求写,批处理调用分区助手分区脚本
  • ¥15 求购HI3519AV100开发板
  • ¥15 请问1553 RT怎么测试,没有BC有方法吗
  • ¥100 业务编程如何选择学习方向和内容?
  • ¥15 wamp3.3.5安装完成后图标正常显示绿色,鼠标左右键点击图标均无反应。求解决方法。
  • ¥15 鼠标点击的这条记录了什么?
  • ¥15 在写pid调速的程序时,电机始终维持最大速度
  • ¥15 【有偿】调用DXGI截图初始化失败,提示0xf 887a0004