Page 1 of 1

Code autocomplete doesn't work

Posted: Tue Apr 03, 2012 1:39 am
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

Re: Code autocomplete doesn't work

Posted: Tue Apr 03, 2012 10:12 am
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

Re: Code autocomplete doesn't work

Posted: Tue Apr 03, 2012 3:00 pm
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 :(

Re: Code autocomplete doesn't work

Posted: Tue Apr 03, 2012 3:11 pm
by eranif
Have you tried installing curl into a different location (i.e. location without space in the path) ?

Eran

Re: Code autocomplete doesn't work

Posted: Tue Apr 03, 2012 4:02 pm
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.

Re: Code autocomplete doesn't work

Posted: Wed Apr 04, 2012 1:07 am
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