Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Dev-C++ IDE: Code Completion

This thread is locked; no one can reply to it. rss feed Print
Dev-C++ IDE: Code Completion
Murray Bozinsky
Member #454
June 2000

As for C++, Dev-C++ does code completion, i.e. it shows me the members of classes while coding and offers me to select a member when i type something like myClass. or myClass-> or myClass::

However, I'm not using C++, just plain C and the IDE does not offer code completion for structs. Can I configure that somewhere?

Dustin Dettmer
Member #3,935
October 2003
avatar

Dev-Cpp is buggy and crippled. The source is in Delphi so no-one can fix it up. The main developer is too slow / probably more interested in other projects.

Jonatan Hedborg
Member #4,886
July 2004
avatar

Kind of ironic, a C/C++ IDE made in Delphi. Are there any other, proper, alternatives? Eclipse is great for Java, not so much for C/C++ (at least in my experience). Any other?

bhagabhi
Member #1,660
November 2001

Jonatan Hedborg said:

Are there any other, proper, alternatives? Eclipse is great for Java, not so much for C/C++ (at least in my experience). Any other?

Code::Blocks is something lots of people use as a replacement for Dev-Cpp, isn't it? (I'm an Eclipse/cdt-lover myself, so I don't know any details.)

mscava
Member #6,815
January 2006
avatar

Yes... I switched to Code::Blocks from DevCpp. And I can't say any bad word about it. And you do have every day new version, which is like a gift of gods to me. I recommend it to everyone...

Dustin Dettmer
Member #3,935
October 2003
avatar

I install Dev-Cpp for my compiler, and use MSVC 2005 Express (its free) for my editor.

LennyLen
Member #5,313
December 2004
avatar

Quote:

Yes... I switched to Code::Blocks from DevCpp. And I can't say any bad word about it.

I've considered switching to Code::Blocks form MinGW Developer Studio. MDS is a good IDE, and it's very stable (It's the only IDE I've ever used, that's never crashed), but it does lack a couple of feaures I would like. And I don't think theres ever going to be a nother version. But if Code::Blocks doesn't have either feature, then there probably is no reason to switch, since I'm otherwise happy.

So, does Code::Blocks have either of the following?

  • The type of code completion described by the OP. Specifically for C structs, since I don't code in C++.

  • Giving tooltip information for functions included in files in the current project. I think Visual Studio does this, but it's been a while since I used it. MDS only offers such information for the standard C funtions.

Jonatan Hedborg
Member #4,886
July 2004
avatar

From what i have seen in CB (which is quite little, considering i just installed it), it does indeed do both things you ask, after a bit of configuration (you need to set the code completer to parse external ("<>") headers)

Murray Bozinsky
Member #454
June 2000

So, Code::Blocks...

I remember having it installed in the past. Since I didn't do any serious coding at that time, I don't really remember it. Anyway I'll give it a chance.

As for the Eclipse Plugin, I have installed that too, but I dislike that as well as the Eclipse JSP-Editor. Eclipse is nice for Java, even though it's a memory-eating monster.

I also remember installing something called Visual MingW, but that was alpha-state and neither did the kind of code completion I was looking for.

I know, MS VC++ IDE can do it, but I wanna keep using MingW and I dislike the idea of using VC with another compiler. In addition I don't like the rest of the IDE. Tons much features I never use anyway.

Anyway, thanks for your advice, I'll check out Code::Blocks now

[edit]

I have now installed the latest nightly build. I like the editor, it seems to be a comfortable tool. BUT: It does not show&offer me the members of my structs when using them :(

I opened the configure-editor-dialog and selected the section "Code-completion and symbols browser". There I checked
+ Follow LOCAL includes
+ Follow GLOBAL includes
+ Parse preprocessor directives

Anyway, nothing happens. Hints anyone?
[/edit]

Jonatan Hedborg
Member #4,886
July 2004
avatar

:/ It does not seem to parse C-style structs properly. I only tried it with C++ style struct :( Sorry

struct test {
  int x;
}; //Works

typedef TEST {
  int x;
}test; //Does not work :(

Murray Bozinsky
Member #454
June 2000

Anyway, thanks for pointing me to this IDE.

Neil Walker
Member #210
April 2000
avatar

Last time I tried c::b intellisense wasn't written.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

BAF
Member #2,981
December 2002
avatar

Quote:

I install Dev-Cpp for my compiler, and use MSVC 2005 Express (its free) for my editor.

Dev-Cpp isn't the compiler, MinGW is. :P And why not use MSVC 2005 Express for the compiler as well?

LennyLen
Member #5,313
December 2004
avatar

Quote:

:/ It does not seem to parse C-style structs properly. I only tried it with C++ style struct Sorry

struct test {
  int x;
}; //Works

typedef TEST {
  int x;
}test; //Does not work :(

How about:

typedef struct {
    int x;
} test;

Jonatan Hedborg
Member #4,886
July 2004
avatar

That was an error on my part, my code was

typedef struct TEST {
  int x;
}test;
//does not work :)


typedef struct {
  int x;
}test; //Nor this

LennyLen
Member #5,313
December 2004
avatar

I gave the latest nightly build a try. I just renamed all the .c files in one of my projects to .cpp and made a C++ project. Once I'd converted my C-style structs to C++ ones the code completion for them worked fine.

HardTranceFan
Member #7,317
June 2006
avatar

I've downloaded C::B, and imported my Dev C++ project. It compiles fine, but when I go to run it, it complains about not finding procedure entry point _install_allegro_version_check in alleg42.dll

What am I doing wrong, and how do I fix it?

--
"Shame your mind don't shine like your possessions do" - Faithless (I want more part 1)

Murray Bozinsky
Member #454
June 2000

Check the project-properties how c::b builds your project. Then compare it to the way DevC++ does it

Go to: