Clearcase Vobs中的Eclipse C ++:未解决的包含 [英] Eclipse C++ in Clearcase vobs: Unresolved inclusion

查看:34
本文介绍了Clearcase Vobs中的Eclipse C ++:未解决的包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让您思考为什么我会收到"未解决的收录"我的项目中包含的某些 .h 文件出错.

I would like to get your thoughts on why I am getting an "unresolved inclusion" error for certain .h files included as part of my project.

我实际上是通过简单地复制,粘贴和重命名从另一个现有项目中克隆该项目的.
在克隆的项目中,该项目最初只有一个 src/目录,我还创建了一个 tst/目录,并在 right-click-> New->上添加了一个 tst/目录.文件夹,然后从菜单中单击高级>> ,然后选择"链接到备用位置(链接的文件夹)"并浏览到/vobs 下的相关路径,将源文件夹添加到我的项目中.

I actually cloned the project from another existing project, by simply copying, pasting and renaming.
Inside the cloned project, which originally had only a src/ directory, I also created a tst/ directory and did right-click->New->Folder and from the menu, clicked on Advanced >> and selected "Link to alternate location (Linked Folder)" and browsed to the relevant path under /vobs to add the source folder to my project.

一旦这样做,索引器便开始重建索引,最后我遇到了上述包含错误.

Once I did this, the indexer started rebuilding the index, at the end of which I got the above mentioned inclusion errors.

.h 文件可以位于/vobs 下的特定文件夹路径内;我首先尝试通过右键单击克隆的项目并选择 Properties-> Paths Symbols-> Includes 来包含此路径,以使用文件夹路径更新包含列表.这不能解决错误.

The .h files could be located inside a specific folder path under /vobs; I first tried including this path by right-clicking on the cloned project and choosing Properties->Paths and Symbols->Includes to update the include list with the folder path. This didn't resolve the error.

随后,我尝试对项目中新创建的 tst/目录重复上述过程;还是不能解决错误.

Subsequently, I tried repeating the above procedure for the newly created tst/ directory from within the project; that didn't resolve the error either.

不确定在这里我想念的是什么.
任何建议,将不胜感激.

Not sure what is it that I am missing here.
Any suggestions would be appreciated.

推荐答案

我的猜测是,启动Eclipse时未在视图中设置您.这将防止解析绝对的"/vobs/...".路径.如果从GNOME(或任何其他窗口式环境)启动Eclipse,则Eclipse的当前工作目录可能是您的主目录.没有视图上下文,/vobs/...路径将不包含任何受源代码控制的文件.

My guess is that you are not set in a view when you start Eclipse. This will prevent resolution of the the absolute "/vobs/..." paths. If you start Eclipse from GNOME (or any other windowed environment) the current working directory of Eclipse is likely your home directory. Without a view context, the /vobs/... paths will not contain any files under source control.

您可以在包含路径中使用/view/myview/vobs/myvob/...,但这意味着使用该项目的每个人都必须启动视图或创建并启动一个名称相同的视图.这只是特定蠕虫病毒罐的开始.

You COULD use /view/myview/vobs/myvob/... in the include paths, but that would mean EVERYONE who would use the project would have to either start your view or create and start an identically named one... And that's just the start of that particular can of worms.

您可能想要确认Eclipse如何处理包含路径中的相对路径.它们是否从Eclipse的当前工作目录开始?项目主目录?别的地方?这样可以为您提供一种与视图无关的安全方式来指定包含路径.

You may want to confirm how Eclipse handles relative paths in the include path. Do they start from the current working directory of Eclipse? The project home directory? Somewhere else? That may give you a safe view-independent way to specify your include paths.

我会尝试设置一个视图,并从cleartool setview产生的子外壳中启动Eclipse.然后验证是否可以访问其中的内容.

I would try setting a view and starting Eclipse from within the subshell spawned by cleartool setview. Then verify whether the includes are accessible.

这篇关于Clearcase Vobs中的Eclipse C ++:未解决的包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆