Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to use Eclipse to edit sources, compiled under C++ Builder, but stuck with Unresolved inclusion problem.

For example, code like:

#include <vector>

Gives Unresolved inclusion: <vector> error in Eclipse IDE. C++ Builder indeed has no vector file, instead it has vector.h which is used by compiler.

Eclipse IDE gives no error if I write

#include <vector.h>

How do I tell Eclipse to use vector.h when it sees #include <vector>?

See Question&Answers more detail:os

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

1 Answer

This allowed me to avoid Eclipse "Unresolved inclusion" error.

In my case I had to find the location of the C++ vector header on my computer (which is a Mac):

find /usr/local -name vector -print

I found the correct include location in folder "/usr/include/c++/4.2.1". Then I set my project eclipse settings like so:

Project->Properties->C/C++ General->Paths and Symbols->GNU C++->(Add)->"/usr/include/c++/4.2.1"

I'm not using C++ Builder, but my solution might address part of your trouble.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...