User forums > General (but related to Code::Blocks)
When open source file directly the auto completion doesn't work
dashashi:
First sorry for my poor english.
I usually write code for some microcontrollers such as PIC and stm32, and the editor of their IDE is head to use, but I have to download the program and debug under their IDE. So I want to use codeblocks just as a editor nor a IDE.
I added the path of header file in the way mentioned http://forums.codeblocks.org/index.php?topic=10933.0 and if I launch CodeBlocks first and then open the source file from CodeBlocks, the auto completion works fine. While if I open source file directlly in the explorer(I set the CodeBlocks as default editor of cpp file), the auto completion just doesn't work.
Is it a bug or something wrong in my setting?
MortenMacFly:
--- Quote from: dashashi on April 22, 2012, 01:16:50 pm ---Is it a bug or something wrong in my setting?
--- End quote ---
If you just open a file it is w/o a project. Thus, C::B cannot know the configuration for that file, e.g. what compiler it uses, what include folders are needed and so on. Therefore CC is disabled, or at least reduced to a minimum.
You need a properly setup project for this to work.
dashashi:
But if I open the file (with out project) in C::B, It just works fine.
And I found after open the file directly, Press F9 to compile, then modify the file a little, save it, the code completion works just fine again- -|||
dashashi:
When there's no project, C::B use GCC as default compiler and why can't it use GCC's global setting of header files to help me auto complete- -||
MortenMacFly:
--- Quote from: dashashi on April 22, 2012, 01:37:29 pm ---When there's no project, C::B use GCC as default compiler and why can't it use GCC's global setting of header files to help me auto complete- -||
--- End quote ---
Well it does (as you had just pointed out), but never to an extend as it is possible with a project. That's what I meant with:
--- Quote from: MortenMacFly on April 22, 2012, 01:22:01 pm ---Therefore CC is disabled, or at least reduced to a minimum.
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version