开发者

C++ coding in eclipse...help with code assist

How can i get C++ coding in eclipse to act like coding in java?

In java, i can nicely add external jar files and the code assist can nicely suggest methods or suggest adding unimplemente开发者_Go百科d methods for interfaces.

But in C++ mode, it doesn't seem to work when i include external header files. What else should i try?


Eclipse CDT itself does not come with any compilers/libraries therefore you need to select and install a toolchain. There are a few options for this

  • Visual Studio (cl)
  • MinGW (g++)
  • Cygwin (g++)

Note, you can get VS Express for free and if you are a student can even get the professional version from Dreamspark

Once you have installed any of these you can select them as the toolchain for your C/C++ projects, this will enable you to build your projects nicely from within eclipse.

Also, you may need to point eclipse to the library files used by your compiler, for instance I use the VS2010 toolchain under Eclipse CDT so I must add

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"

to the include directories in build settings.

Edit: Sorry if it wasn't clear, once you've done this code completion should work for your C/C++ projects.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜