Code autocomplete doesn't work

General questions regarding the usage of CodeLite
soMan
CodeLite Enthusiast
Posts: 30
Joined: Tue Apr 03, 2012 1:18 am
Genuine User: Yes
IDE Question: C++
Contact:

Code autocomplete doesn't work

Post by soMan »

Hi all. Writing here to find out why autocomplete doesn't work (can't find an include file). I created a workspace with 2 projects.
In workspace settings added path to include for code complete, enabled clang code complete and now I get error that path is couldn't be finded.
* Full retag of workspace doesn't help.
* Path to libCURL include folder is correct.

Windows 7 x86 SP1 Pro, CodeLite 3.5.5377

My settings:

Image
Image
Image
Image
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code autocomplete doesn't work

Post by eranif »

You have 2 problems that I see:

1) The ctags completion paths is empty, this means that I will not be able to search for standard classes like the members of 'std', to fix this:

Copy all paths from 'clang' to the 'ctags -> Include Files' upper box
Click OK and then retag your workspace from the main menu: "workspace -> Retag workspace (full)"

The second problem that you have:
clang complains that it can not find 'curl/curl.h', this means that your project settings missing this include path.
You did added it, but to the 'code completion' section.

Unlink ctags completion, clang is an actual compiler and it will use the paths that you use in your project. In other words: if your code can compile inside codelite, then clang will work.
please read here for more information:

http://www.codelite.org/LiteEditor/ClangIntegration35

As a rule of thumb: ctags should be your default code-completion, it will rarely fails to complete (mainly when heavy macroing / templating is used)

Eran
Make sure you have read the HOW TO POST thread
soMan
CodeLite Enthusiast
Posts: 30
Joined: Tue Apr 03, 2012 1:18 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code autocomplete doesn't work

Post by soMan »

1) The ctags completion paths is empty, this means that I will not be able to search for standard classes like the members of 'std', to fix this:
I fix it as you written. Now all is ok with members of std.
clang complains that it can not find 'curl/curl.h', this means that your project settings missing this include path.
Include paths in project's compiler settings are correct and all two projects in workspace normally build without any errors, so code complete doesn't work now. If disable clang, Ctrl+Space just do nothing and if clang is enabled I get previous error on screenshot. Nor full retag neither codelite restarting don't help me. Playing with settings about one hour... can't solve the problem :(
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code autocomplete doesn't work

Post by eranif »

Have you tried installing curl into a different location (i.e. location without space in the path) ?

Eran
Make sure you have read the HOW TO POST thread
soMan
CodeLite Enthusiast
Posts: 30
Joined: Tue Apr 03, 2012 1:18 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code autocomplete doesn't work

Post by soMan »

Have you tried installing curl into a different location (i.e. location without space in the path)?
Yes. With path without spaces cc works well. Thanks for the help. I think you'll fix this mini-problem in next release.
And I should add that code complete works if clang is enabled.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Code autocomplete doesn't work

Post by eranif »

soMan wrote: I think you'll fix this mini-problem in next release.
I am pretty sure that codelite does wrap the paths in quotes, its clang that does not accept it

Eran
Make sure you have read the HOW TO POST thread
Post Reply