随笔 - 132  文章 - 51  trackbacks - 0
<2012年10月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用链接

留言簿(7)

随笔分类

随笔档案

文章分类

文章档案

cocos2d-x

OGRE

OPenGL

搜索

  •  

最新评论

阅读排行榜

评论排行榜

参考地址:在Win7系统下搭建Eclipse+Cygwin开发环境 http://www.cnblogs.com/williamwue/archive/2011/06/30/2094979.html

问题:用eclipse 建立编译C++工程出现错误提示 symbol could not be resolved

解决办法:

1.window -> preferences -> C/C++ -> debug -> source lookup path > Path Mapping
Name:whatever  CompilationPath: \cygdirve\c      Local file system path:C:\

用cygwin下的c盘来替代当前的C盘 来查找需要的库文件


2.
indexer:  index source and header files opened  in editor
window -> preferences -> C/C++ -> indexer

OK编译的错误解决了
运行时又出现了如下的BUG:


找不到对应的文件,无法进行调试,GOOGLE了半天才找到解决的方法:
If you're working under Windows, have you set the required mappings?
Maybe Eclipse couldn't find the Source because of the missing mapping to
the (cygwin-)drive where your projects/workspaces are.

When you start Cygwin, enter "mount" and look for the mapping you have:
They may look like this:


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)



My Projects ara all under J:\Projects, so my mapping needs to be present
in Eclipse as:
/cygdrive/j j:/


Open Eclipse and then click
- Windows => Preferences => C/C++ => Debug =>Common Source Lookup
Path
- Add a new Path Mapping: click [Add] => Path Mapping => [OK]
- Select the new Mapping => [Edith] => change Name of Mapping "Project
Source" => [Add]
set "Compilation path" to the Source (Sample cygwin!) "/cygdrive/j"
(without the quotes!)
set"Local file system path" tho "J:\" (without the quotes!)
上面配置对应了/cygdrive/c  C:\
但是我在windows下的工程目录都是在G盘,同样添加一个G盘的对应目录就OK了



posted on 2012-10-24 10:56 风轻云淡 阅读(7066) 评论(2)  编辑 收藏 引用 所属分类: Toolkit

FeedBack:
# re: win7+eclipse+CDT+cygwin symbol could not be resolved 2012-10-28 15:13 小张
我的/cygdrive/c 会被自动转换为\cygdrive\c然后就又找不到文件了。
也就是任何/都会在输入后被转换为\ 求解!
我用的是eclipse juno
  回复  更多评论
  
# re: win7+eclipse+CDT+cygwin symbol could not be resolved 2012-11-01 21:02 Let me see see
@小张
我的也是自动转为\cygdrive\c 这样没问题  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理