Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
214 views
in Technique[技术] by (71.8m points)

Eclipse C++ in Clearcase vobs: Unresolved inclusion

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.

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.

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.

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.

question from:https://stackoverflow.com/questions/65878047/eclipse-c-in-clearcase-vobs-unresolved-inclusion

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check first if those files are there, in your view. '/vob' could mean dynamic view, mounted under /vob.

I would rather work with a snashot view, which would download those same files on disk (rather than using the MVFS, Multi-Version FileSystem of a dynamic view).

Then, when you are sure the files are there, and cleartool ls shows them correctly loaded, you can double-check your inclusion paths, as mentioned here

"unresolved inclusion" means the file can't be found.
This means the directory containing it hasn't been specified to CDT or it has been misspelled.

If spelled correctly, normally you would specify the path with Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. on the Entries tab as a user entry.

Note that it depends on the type of project.
When you select File --> New -> C/C++ Project you are presented with various options. The options are for the kind of builder used. Some, such as Meson, Qt , Arduino and maybe others don't have the option "Preprocessor" option.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...