出错提示:Can't find a source file at "xxxxx“Locate the file or edit the source lookup path to include its location.
解决:来自ECLIPSE的WIKI:
http://wiki.eclipse.org/CDT/User/FAQ#Debugging_C.2FC.2B.2B_Projects
DETAIL:
I'm using cygwin and when launching the debugger, it complains that it can't find the source file
You must provide a mapping from /cygdrive/c to c:/ (or whatever your drive letter is).
To do this,
- From the editor error page, select the "Edit Source Lookup Path..." button and select the "Add..." button
- Or, in the eclipse IDE, go to menu Window -> Preferences -> C/C++ -> Debug-> Common Source Lookup Path -> Add.
- From the list of lookup containers, choose Path Mapping and OK. You get a New Mapping in the list.
- Select the mapping and then Edit. In the Modify the path mappings dialog, select Add, and then enter:
- /cygdrive/c as the compilation path and
- c:/ as the local file system path.
- Select OK, OK, OK to finish the dialogs.
- Terminate the debug session and restart; it should find your source files now.
This setting will apply to any debug sessions launched from this workspace.
You can also modify the settings in each individual launch configuration.
本文介绍了解决Eclipse CDT在调试过程中找不到源文件的问题,特别是使用cygwin环境下如何正确配置源文件查找路径的方法。通过设置本地文件系统路径映射到编译路径,可以确保调试器能够找到所需的源文件。
5331

被折叠的 条评论
为什么被折叠?



