Content Assist and the STL

Topics for the Eclipse Environment
Post Reply
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Content Assist and the STL

Post by tod »

Is there a trick to getting Content Assist to work with the Standard Template Library? For example I would hope that when I type the name of a <vector> my_vector. and hit Ctrl-space I would see a list of <vector> operations.
fanat9
Posts: 56
Joined: Thu Apr 24, 2008 4:23 pm
Location: Boston
Contact:

Re: Content Assist and the STL

Post by fanat9 »

First, index cache size limit could be a problem.
In General settings -> Indexer -> Cache limits.
I got 4G RAM on my machine, so next settings probably not optimal in terms of memory usage, but still I will post it just in case: 25% of Heap size, 256M of Absolute limit's. You can change Heap in eclipse.ini file. Again, I have -Xmx1024m, -Xms512;

If cache size is Ok, then add path to gcc headers in Project Include Paths and Symbols.
Project properties -> C++ Include paths and Symbols -> Add External Include Path... Something like "C:\MinGW\include\c++\3.4.5"

then,

In Project properties -> C/C++ Project Paths -> Path Containers -> Add: double click on Discovered scanner configuration container(Should find all available Include Paths and Preprocessor Symbols), then Finish.

And finally, in C/C++ Projects for current project: Clean project, Index -> Rebuild.


Please let me know if it works for you.
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: Content Assist and the STL

Post by Forrest »

Great advice fanat9...

Just to be clear, in our tools, standard install directory, the directory to c++ stl would be C:\nburn\gcc-m68k\m68k-elf\include\c++\4.2.1
fanat9 wrote: If cache size is Ok, then add path to gcc headers in Project Include Paths and Symbols.
Project properties -> C++ Include paths and Symbols -> Add External Include Path... Something like "C:\MinGW\include\c++\3.4.5"
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Content Assist and the STL

Post by tod »

Thanks to both of you. Forrest knows me, I take things too literally. While I did increase my memory settings since I have 4 Gig on the machine it didn't work until I added the path to the STL. Since I use Galileo the instructions varied a little, here are the steps in Galieleo


Project ->Properties -> C/C++ General->Paths and Symbols
Click C++ Source Files
Click Add
Click File System
Navigate to C:\NBurn\gcc-m68k\m68k-elf\include\c++\4.2.1
Click OK
Say Yes to dialog for rebuilding indices
Wait for the index to rebuild, and now I see just what I wanted.


Image
Forrest wrote:Great advice fanat9...

Just to be clear, in our tools, standard install directory, the directory to c++ stl would be C:\nburn\gcc-m68k\m68k-elf\include\c++\4.2.1
fanat9 wrote: If cache size is Ok, then add path to gcc headers in Project Include Paths and Symbols.
Project properties -> C++ Include paths and Symbols -> Add External Include Path... Something like "C:\MinGW\include\c++\3.4.5"
Post Reply