User forums > Using Code::Blocks

I doesn't manage in using auto-completion fine

(1/2) > >>

pivit80:
Hi,
I've a problem with autocompletion.

Beside all, I want to know if I had to create a new project in order to use autocompletion, or if I can use autocompletion also with a single c++ file.

Then, an example:

suppose I've this simple code:


--- Code: ---#include <iostream>
#include <conio.h>
#include <math.h>

using namespace std;

int main(int argc, char **argv)
{
cout<<"Hello world!"<<endl;
cout<<"Press a key to continue...";
getch();
return 0;
}

--- End code ---

this is the main file of a codeblocks project.

in this code if I begin to write getch() nothing compare, even though I press ctrl+space;
the same if I begin to write any math.h function.

I've noticed if I go to project->properties->search directories and add the include dir of mingw installation, code completion works.

But, in this way for every project I create, I must manually add the mingw include directory.
This is normal if I want to incluide a my own library I want to use;
but not if I want to use the standard c++ library.

So I think I've missed something.
What's the correct way to proceed?

Thank you in advance.
pv

TDragon:

--- Quote from: pivit80 on March 26, 2007, 10:42:04 am ---Beside all, I want to know if I had to create a new project in order to use autocompletion, or if I can use autocompletion also with a single c++ file.

--- End quote ---
I always disable the Code Completion plugin, so I don't know whether it would work without a project open or not. I expect not.


--- Quote ---I've noticed if I go to project->properties->search directories and add the include dir of mingw installation, code completion works.

--- End quote ---
There is a similar place to enter search directories globally, in Settings->Compiler and debugger->Global compiler settings->Search directories

pivit80:

--- Quote from: TDragon ---There is a similar place to enter search directories globally, in Settings->Compiler and debugger->Global compiler settings->Search directories
--- End quote ---

Yes, I've placed directories in it, but it doesn't work anyway with single files.
Instead, If I create project, it doesn't use these directories, and I must add it manually to project->build option->search directories panel.

Why?
Is there anyone use auto-completion in codeblocks, and it works fine?

Thank you again.

pv

pivit80:
Noone does use it?
Repeat, is there anyone use auto-completion in codeblocks, and it works fine?

Thank you in advance.
pv

Yuki:

--- Quote from: pivit80 on March 27, 2007, 08:24:30 am ---Noone does use it?
Repeat, is there anyone use auto-completion in codeblocks, and it works fine?

Thank you in advance.
pv

--- End quote ---

I have used the auto-completion in C::B, And I think that it is
far from perfect . I also have used the VC plug-in Visual Assist X which comes from Whole Tomato Software (http://www.wholetomato.com/). It's an excellent code-completion plug-in. if the auto-completion in C::B works as well as VAX.It will be very good for our C::B users.

Navigation

[0] Message Index

[#] Next page

Go to full version