[我正在使用MinGw编译器,每当我尝试调试代码时都会出错。以及为什么在我使用mingw

问题描述 投票:0回答:1
时它的位置是cygwin
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target: 
Debug
Adding source dir: H:\C Language\Character-Strings-(Demonstration)-Utilizing-common-string-functions-Source-code\
Adding source dir: H:\C Language\Character-Strings-(Demonstration)-Utilizing-common-string-functions-Source-code\
Adding file: H:\C Language\Character-Strings-(Demonstration)-Utilizing-common-string-functions-Source-code\bin\Debug\CommonStringFunctionsExample.exe
Changing directory to: "H:/C Language/Character-Strings-(Demonstration)-Utilizing-common-string-functions-Source-code/."
Set variable: PATH=.;C:\Program Files\mingw-w64\mingw64\bin;C:\Program Files\mingw-w64\mingw64;C:\Cygwin\bin;C:\Cygwin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;F:\runtime\win64;F:\tools\pcb\bin;F:\tools\fet\bin;F:\tools\specctra\bin;F:\tools\bin;F:\tools\PSpice\Library;F:\tools\Capture;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin;F:\bin;C:\Program Files\Git\cmd;C:\Users\saihi\AppData\Local\Microsoft\WindowsApps;C:\Users\saihi\Anaconda3\Library\ssl;C:\ProgramData\saihi\atom\bin;C:\Users\saihi\AppData\Local\Programs\Microsoft VS Code\bin
Starting debugger: C:\Program Files\mingw-w64\mingw64\bin\gdb.exe -nx -fullname -quiet  -args "H:/C Language/Character-Strings-(Demonstration)-Utilizing-common-string-functions-Source-code/bin/Debug/CommonStringFunctionsExample.exe"
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 8.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0
c debugging compiler-errors cygwin mingw
1个回答
0
投票

您将需要GDB来调试使用MinGW的gcc构建的代码。

这里是一个说明如何完成的链接:https://code.visualstudio.com/docs/cpp/cpp-debug

而且看起来您正在使用旧版本(GDB 8.1,而当前版本是9.2)。签出http://winlibs.com/以获取包含GDB 9.2的MinGW-w64最新版本的构建。

© www.soinside.com 2019 - 2024. All rights reserved.