ama*_*ion 9 eclipse ide configuration eclipse-cdt
当我尝试使用eclipse CDT中的GDB调试我的应用程序时,出现以下错误:
Can't find a source file at "../mingw/main.c"
Locate the file or edit the source lookup path to include its location.
Run Code Online (Sandbox Code Playgroud)
Eclipse正在寻找../mingw/main.c中的源文件位置,但它应该在/edit/src/main.c中.正如您在下面的屏幕截图中看到的,edit/src是源查找路径的一部分.为什么要看../mingw?我找不到任何让它看起来的配置设置.
我正在使用eclipse Juno,CDT 8.1,Windows 7 64bit
这是你的答案http://www.eclipse.org/forums/index.php/t/57027/
如果您在Windows下工作,是否设置了所需的映射?也许Eclipse无法找到Source,因为缺少映射到您的项目/工作区所在的(cygwin-)驱动器.
当你启动Cygwin时,输入"mount"并查找你的映射:它们可能如下所示:
Admin@bs11-01xp ~
$ mount
D:\cygwin\bin on /usr/bin type system (binmode)
D:\cygwin\lib on /usr/lib type system (binmode)
D:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
d: on /cygdrive/d type system (binmode,noumount)
e: on /cygdrive/e type system (binmode,noumount)
j: on /cygdrive/j type system (binmode,noumount)
n: on /cygdrive/n type system (binmode,noumount)
u: on /cygdrive/u type system (binmode,noumount)
w: on /cygdrive/w type system (binmode,noumount)
x: on /cygdrive/x type system (binmode,noumount)
y: on /cygdrive/y type system (binmode,noumount)
z: on /cygdrive/z type system (binmode,noumount)
Run Code Online (Sandbox Code Playgroud)
我的项目全部都在J:\Projects
,所以我的映射需要在Eclipse中出现:
/cygdrive/j j:/
Run Code Online (Sandbox Code Playgroud)
打开Eclipse然后单击
--Windows => Preferences ... => C/C++ => Debug => Common Source Lookup Path
- 添加新的Path Mapping:单击[Add] => Path Mapping => [OK]
- 选择new Mapping => [Edith] =>更改映射名称"项目源"=> [添加]
- 将"编译路径"设置为源(示例cygwin!)"/ cygdrive/j"(不带引号!)
- 设置"本地文件系统路径"tho"J:\"(没有引号!)
现在你准备好再试一次....祝你好运!
归档时间: |
|
查看次数: |
7934 次 |
最近记录: |