开发者

Eclipse[HELIOS] CDT: Autocomplete, STLs not working with Eclipse ..HELP!

I am a java user but wanted to play around with CPP so I installed CDT plugin for eclipse [HELIOS].

I am facing some issues trying to configure it correctly and am wondering if someone can help me. Here is a short code we can use:

  #include "Base.h"
// These lines give error => Unresolved inclusion: <vector>
    #include <vector>
    #include <string>
    using namespace std;

    void Base::ininitalizeVector()
    {
        for (int i = 0; i < 10; i++)
        {
            bIntVector.insert(i); //after pressing "." no method names etc appear
        }
开发者_开发问答    }

1] The auto complete feature doesnt work for STLs . 2] I cant get a list of supported methods etc after I hit dot"." 3] Includes do not work: #include 4] I think using namespace std is enough for STLs to work , but guess not enough for IDE support ?. Do I even need to say #include

I did rightclick project => rebuild indexes but that didnt help In my project=> general=>source location: the source folder is the folder that has this CPP file and the header file.

I probably havent configured things correctly , any help ?

Infact , if there is someother IDE which works quickly out of the box, I will be happy to try that out. All I want is some IDE support so that I can verify things while I read on cpp.

Thanks

  • This is where I got the CDT: http://download.eclipse.org/tools/cdt/releases/helios/
  • I am running eclipse on Windows off a folder: C:\USER\setups\eclipse


Unresolved inclusions in CODAN, no autocompletion for the types linked to the headers in question, all mean that Eclipse cannot find the headers you are requesting in the places you told it in the project settings. On Linux the STL headers are usually in /usr/include/c++/<GCC Version>. However on Windows the STL headers are not shipped with it (nor any GNU tools either), so you have 'fake' a Linux environment by installing Cygwin.

Windows development is always easier in Visual Studio - they were designed for each other after all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜