codecomplete and stl

General questions regarding the usage of CodeLite
giugio
CodeLite Curious
Posts: 3
Joined: Mon Mar 09, 2009 3:15 am
Contact:

codecomplete and stl

Post by giugio »

Hy.
I'm test codelite and it's fantastic !.
My only problem now is how to use code completion on the stl container like vector,amp and they function like push_back ecc...
Thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: codecomplete and stl

Post by eranif »

Hi,

the code completion of STL works for the first level only - i.e. codelite fails in resolving the template arguments.

So, this should work:

Code: Select all

std::vector<std::string> v;
v. // <--- code completion will offer completion here
However this will fail:

Code: Select all

std::vector<std::string> v;
v.at(0). // <--- code completion will FAIL to understand that at(0) is actually std::string
If you dont get code completion even for what I wrote that should work, then check that:
- You have 'using namespace std;' OR
- you are using full path (e.g. std::map)
Also to check:
- do you have external symbols database attached? (should be mentioned in the status bar)
- if you do have external symbols database, please make sure it includes all the symbols from the STL, you can do this from: Tags -> Tags Management and select the active external symbols database, once it is selected it will list the paths of which it was created from.

General comment:
- make sure you mention your OS and CodeLite version (SVN or one of the binaries provided by me)

Eran
Make sure you have read the HOW TO POST thread
Verax
CodeLite Enthusiast
Posts: 46
Joined: Sat Jan 19, 2013 10:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: codecomplete and stl

Post by Verax »

I'm also having some trouble with this.

Here's my test code:

Code: Select all

#include <queue>

using namespace std;

int main()
{
	queue<int> q;
	q.   //<----- Nothing pops up here
	return 0;
}
Code builds fine. Tried a retag of the workspace with no luck.

Also, if I attempt to use fully qualified names, I also don't see anything.

Code: Select all

#include <queue>

int main()
{
	std::   //<----- Nothing pops up here
	return 0;
}
Please advise

-----------------------------------------------------------
CodeLite 5.0.x (Custom build from trunk 2013-01-28, using included MinGW compiler)
Windows 7
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: codecomplete and stl

Post by eranif »

wow, please don't hijack 4 years old thread... ;)
The bug that is mentioned on this thread was long ago fixed (not to mention that some of the concepts were modified since 2009)

For your problem:

It works here...so it must be a configuration problem.
Please see this thread for what to post - please create a new thread instead of this one

Eran
Make sure you have read the HOW TO POST thread
Verax
CodeLite Enthusiast
Posts: 46
Joined: Sat Jan 19, 2013 10:31 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: codecomplete and stl

Post by Verax »

Will do, my apologies.

I reverted back to the offcial build (5.0.6213) and the problem is gone. It must have been something will my persona build.
Post Reply