tags:

views:

398

answers:

2

Hi,

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 <boost/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

A: 

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

teZeriusz
Thanks. What I now made was changing the Indexer for this project to full indexer -> no success. Could you be more specific? How do I "reindex"?
Maus
rmb on project->index->rebuild
teZeriusz
A: 

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.

Maus