User forums > Using Code::Blocks
Enabling auto-completion for files not included in the project
lemerou:
Hi,
I'm using Codeblocks rev 2535 with Ubuntu 6.06 for coding a wxWidgets based application, and I have a litte problem with the auto-completion.
Actually, it is only enable for my local files and doesn't parse all "wx.....h" files in my "/usr/include" directory.
It works only if I add all includes files of wxWidgets in the project but it is not a good solution.
How can I force the parser to scan the "/usr/include/wx2.6/wx" directory ?
sethjackson:
Hmm maybe:
Settings -> Editor -> Code-completion and symbols browser -> Follow GLOBAL includes
Yomen:
--- Code: ---Hmm maybe:
Settings -> Editor -> Code-completion and symbols browser -> Follow GLOBAL includes
--- End code ---
This doesn't work for me, I still don't get code-completion to 'suggest' anything outside my immediate project files.
mandrav:
You have to understand that C::B will not blindly go around your hard disk to find header files...
It uses "search dirs" which are coincidentally the compiler's search dirs.
Now, in the wxWidgets case (as in many other linux packages too), you don't setup the compiler's search dirs yourself but rather add `wx-config --cflags` in compiler options and this takes care of everything. But C::B doesn't know about it...
So, the short answer is to manually add "/usr/include/wx2.6/wx" (or whatever) in your compiler search dirs so that C::B can locate the wx headers.
takeshimiya:
--- Quote from: mandrav on June 15, 2006, 08:38:23 am ---You have to understand that C::B will not blindly go around your hard disk to find header files...
It uses "search dirs" which are coincidentally the compiler's search dirs.
Now, in the wxWidgets case (as in many other linux packages too), you don't setup the compiler's search dirs yourself but rather add `wx-config --cflags` in compiler options and this takes care of everything. But C::B doesn't know about it...
So, the short answer is to manually add "/usr/include/wx2.6/wx" (or whatever) in your compiler search dirs so that C::B can locate the wx headers.
--- End quote ---
Hi!
Little question: how much feasible is to parse the output from backticks looking for a -I and feed it to the CodeCompletion plugin?
Navigation
[0] Message Index
[#] Next page
Go to full version