C++ 在Eclipse中调试C-“;Can';“找不到源文件”;
我已经为C/C++开发人员和cygwin安装了Eclipse,如下所示。另外,在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
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()
的第一行设置断点,然后运行调试对象。你所说的源代码不是我的是什么意思?