ECLIPSE调试C++出错的解决方法

出错提示: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,

  1. 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.
  2. From the list of lookup containers, choose Path Mapping and OK. You get a New Mapping in the list.
  3. 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.
  4. Select OK, OK, OK to finish the dialogs.
  5. 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值