开发者

Use Eclipse's code completion for boost

I would like to profit from Eclipse's code completion for boost:shared_pointer in Eclipse 3.5 with CDT 6.0. Eclipse doesn't offer any completion while I'm writing the following code:

#include <boos开发者_Python百科t/shared_ptr.hpp>

#include "A.h"

typedef boost::shared_ptr<A> aPTR;

int main() {

    aPTR test(new A);

    test->ge.... // no completion (there is a getter in class A)

return 0;
}

The funny thing: My old Eclipse 3.4 with CDT 5.0 on my other computer performs code completion for boost-stuff without any problem.

Do I need to proceed any configuration steps to get code completion with boost work? Do I have to index the boost files in /usr/include/boost/ in a special kind? Is there a way to force Eclipse to re-index the stuff.

Finally: Yes I know this Post but I'm missing any concrete "next steps" in it.

thanks


Eclipse CDT indexing of boost libraries starts struggling with version 1.37 (or even 1.36, couldn't verify that) already.

My workaround to benefit from code completion while using an up-to-date boost version (1.39) is the following one:

  • I have got two boost versions (1.35 and 1.39) on my computer.
  • In the Debug Build Configuration (Settings/Directories) I set the include path to the old boost version.
  • In the Release Build Configuration I set the include path to the actual boost library.
  • I set the Indexer Option "Build Configuration for the Indexer" to "Use fixed build configuration" > Debug

The indexer uses now the old library for indexing and code completion but the release version will still be compiled with the recent boost version. At least this worked for me. Please verify this for your build configuration, if you're suffering the same problem!!

Sometimes, it seems to be rocket science.


Reindexin i what you need to do. If this will not help you tweak indexer to 'full indexer'.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜