Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Auto completion in CodeBlocks

This thread is locked; no one can reply to it. rss feed Print
Auto completion in CodeBlocks
Kevin Adrian
Member #7,087
April 2006
avatar

Hello,

A few days ago I have decided to edit my Allegro projects with CodeBlocks. Now I have a question about the code auto completion mechanism. It works fine on classes and functions I have written by myself. But is does not work on elements of the STL, for example. Is there any possibility to configure CodeBlocks so that it becomes able to auto complete functions and classes of external libraries?

My mouth will speak words of wisdom; the utterance from my heart will give understanding. (Psalm 49:3)

OICW
Member #4,069
November 2003
avatar

You need to enable local and global includes parsing and probably add some priority headers to parse. It's in the editor settings under code completion. Though I must warn you that the parser works from time to time. Sometimes it works, sometimes it doesn't, at least that's my impression. I'm using nightly builds via apt repository. You just won't get the comfort of the MSVS with Visual Assist X plugin, hate to say it :(

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

SiegeLord
Member #7,827
October 2006
avatar

Code::Blocks's auto-complete sucks. Use a better IDE (e.g. Eclipse works well).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

OICW
Member #4,069
November 2003
avatar

SiegeLord: actually as I'm working with more and more, I'm getting more and more inclined to switch to different IDE for C++ development. I might give Eclipse a try.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

SiegeLord
Member #7,827
October 2006
avatar

That's personally why I switched, I just figured that if I'm going to be using a (bloated) IDE, I might as well use one that actually works well. A test I use to see if an IDE is any good is if it auto-completes Allegro's functions (which are declared using a macro). Code::Blocks could never do that for me, while Eclipse did (I've seen a few other non-MSVC IDEs that also passed this quick test, notably KDevelop, but Eclipse was good enough for me).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

beoran
Member #12,636
March 2011

I can also endorse KDevelop, it's a fine IDE. Only downside is it's tendency to grow unstable and crash occasionally if I leave the application open for days on end, which I am wont to do.

OICW
Member #4,069
November 2003
avatar

Well, I generally hate to switch between programs I'm accustomed to, but as we talk I'm working on the project of mine and disability of C::B to properly parse my namespace and class structure when typing "foo::bar::something" is getting on my nerves. Guess I'll have to switch further projects to Eclipse or something else.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

pkrcel
Member #14,001
February 2012

I also find myself working with C::B and VS2012, C::B has the plugin architecure that's pretty much streamlined and works very well, ALSO with the debugger, but SADLY the codecompletition is somewhat lacking compared to the competition.

That's why recently I worked much more with VS2012. I like the interface fair enuff and the Intellisense works veryveryvery well.

I kind of dislike Eclipse but that's due to some years ago experience at work where I found it to be abismally SLOW, while I was able to integrate codesourcery toolchain in C::B pretty quickly.

I may give Eclipse another try sooner or later...

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

LennyLen
Member #5,313
December 2004
avatar

The first time I installed Eclipse, it would crash almost every time I tried to save a file, which made it pretty much useless.

The time after that, which was a while later when I was playing around with Android development, it worked perfectly.

Then a few months later I bought a new primary HDD so reinstalled everything, and this time I couldn't get Eclipse to run for more than a few minutes without it crashing.

I haven't bothered with it since.

Specter Phoenix
Member #1,425
July 2001
avatar

I've been using Qt Creator for my allegro things I've done. I rather like their auto-complete.

"Can't a man even talk to himself without being interrupted?" -Krull(1983)
"Through vengence I was born. Through war I was trained. Through love I was found. Through death I was released. Through release I was given a purpose." -- Specter Phoenix
"Programming == AWESOME the rest is just tools to accomplish it."
END OF LINE

OICW
Member #4,069
November 2003
avatar

LennyLen: I remember time when I've been using Eclipse at work for C++ development. During the lunch break I'd restart computer just to get that bloody thing reclaim memory eaten by Java. Not even the "poke garbage collector" plugin helped, at least not very much.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Kevin Adrian
Member #7,087
April 2006
avatar

Thank you for your comments. I have configured CodeBlocks as mentioned and now it is sufficient for my needs. I think now I can give CodeBlock a try at least for some while ;)

My mouth will speak words of wisdom; the utterance from my heart will give understanding. (Psalm 49:3)

Go to: