Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在Eclipse中调试C-“;Can';“找不到源文件”;_C++_C_Eclipse_Debugging - Fatal编程技术网

C++ 在Eclipse中调试C-“;Can';“找不到源文件”;

C++ 在Eclipse中调试C-“;Can';“找不到源文件”;,c++,c,eclipse,debugging,C++,C,Eclipse,Debugging,我已经为C/C++开发人员和cygwin安装了Eclipse,如下所示。另外,在Preferences>C/C++>environment中,我添加了所有变量。我在cygwin中安装了/c到c:现在,当我在终端中键入mount时,我得到以下信息: $ mount C:/cygwin64/bin on /usr/bin type ntfs (binary,auto) C:/cygwin64/lib on /usr/lib type ntfs (binary,auto) C:/cygwin64

我已经为C/C++开发人员和cygwin安装了Eclipse,如下所示。另外,在
Preferences>C/C++>environment
中,我添加了所有变量。我在cygwin中安装了/c到c:现在,当我在终端中键入
mount
时,我得到以下信息:

$ mount 
C:/cygwin64/bin on /usr/bin type ntfs (binary,auto) 
C:/cygwin64/lib on /usr/lib type ntfs (binary,auto) 
C:/cygwin64 on / type ntfs (binary,auto) 
C: on /c type ntfs (binary,user)
我的程序在Eclipse中成功构建并运行,但是当我尝试调试(在第一行添加断点)时,我得到了错误:

Can't find a source file at "/cygdrive/c/Users/steve/eclipse-workspace/myProgram/myProgram.c" 
Locate the file or edit the source lookup path to include its location.
然后,我找到了处理此错误的方法,因此我的路径映射是
/cygdrive/c:\

但是,我现在在尝试调试时遇到以下错误:

Can't find a source file at "/usr/src/debug/gcc-7.4.0-1/libgcc/config/i386/cygwin.S" 
Locate the file or edit the source lookup path to include its location.

我不知道该怎么办,有人能帮我吗?

你是被迫使用cygwin的吗?您需要POSIX层吗?您可能会发现,在一个更接近本机MinWG开发环境的环境中,事情更容易处理?提到的来源不是你的,因此没有提供。在
main()
的第一行设置断点,然后运行调试对象。你所说的源代码不是我的是什么意思?