tags:

views:

253

answers:

6

Possible Duplicate:
C++ IDE for Linux?

I'm looking for a suitable for me IDE for C/C++. I'd like not to use projects etc, the main idea that I've accustom is to compile a file (not build a project) and run a compiled program then. So things like code::blocks as well as M$ VC are not for me... well, there is FreePascal IDE that is fully looks like I'd like to - I can simply open a source file, run it with one key, debug it (aka step and next, but run to cursor and breakpoint also) without seeing how gdb actually works, open watch windows and so on. Is there something with similar features for C/C++? I'm tired of editing everything in FAR/midnight internal editor and compile than with g++ -o <> and sometimes use gdb from command-line when nothing help. I don't care if it is text-based or GUI but I just wish it to be simply and free. Better if there is highlight (maybe even basic syntax checking), would very good if IDE can work like or with memcheck/valgrind... Any suggestions, please?

+5  A: 

The Qt Creator is

  • nice and easy to work with
  • current as well as maintained / being extended
  • cross-platform (which may be a benefit at some other point in time)
  • free in all the right senses (speech, code, beer, ...)
  • does not force you to use Qt if you don't want
  • can work with Makefiles

and generally does more than you as for here. Worth a look.

Dirk Eddelbuettel
Like an advertisement?Well, I can't find if there is a way to debug simply c++ console application from .cpp file as is.
Nick
I like the value proposition -- it is just a quick 'apt-get install qtcreator' away.
Dirk Eddelbuettel
+1 for Qt Creator....it's a nice, simple, ide.
Timothy Baldridge
yum install... but no matter. i don't want qt currently, just a cli
Nick
Maybe you just want a debugger (frontend). Have you looked at ddd?
Dirk Eddelbuettel
A: 

I recommend this:

http://wxdsgn.sourceforge.net/

It's free, includes a compiler and "just works". It has a built-in debugger and everything.

Timothy Baldridge
Well, I took a look to pure dev-c++, something wasn't work properly don't remember what. Maybe... wx is better. But, is it for Windows only?
Nick
yeah, I think it's Windows only. The dev-c++ program is exactly the same except it's about 5 years old. The one I linked to is more basically the same thing with a few GUI tools thrown in.
Timothy Baldridge
A: 

You can compile single files in Code::Blocks without making a project. It's just that if you do it that way, you'll get warnings like "This syntax is valid for C/C++ but not for Objective-C" or something (it's been a while since I've worked with Code::Blocks myself, so I don't remember the exact error messages); by making a project for your file, you can specify whether you want to compile as a C program, a C++ program, or what have you. Otherwise the IDE basically guesses as to what you want to compile it as. And I'd recommend doing it project-wise anyway, because you can make different build configurations and such for easier testing (without having to use makefiles).

If even that is too much for you, then just go with something in someone else's answer.

JAB
Well, I can compile there but can't debug without making project
Nick
Ah, I see. Never really used the debugger from Code::Blocks, so hadn't encountered that problem in the past.
JAB
+1  A: 

Eclipse does what you ask I would say.

It's free, easy to install and use (at least for me), does not need command line for compiling, can compile/run a single file just by pressing a button, can do debug, has highlighting, works under Linux.

nico
don't think you've read the question - eclipse is definitely not what he wants
milan1612
@milan1612: I'm sorry but Eclipse is an IDE which is free, easy to install and use, does not need command line for compiling, can compile/run a single file just by pressing a button, can do debug, has highlighting, works under Linux. Which one of his requests are not met by Eclipse?
nico
I agree, Eclispe does fit the bill even if... it certainly works better with Java than C++. What's great too is the possibility of extensions.
Matthieu M.
It he thinks Visual C++ is overkill, Eclipse won't work for him. Besides, Eclipse is about the slowest, most confusing, least intuative IDE I've ever used.
Timothy Baldridge
@nico: Your answer would be better if it contained the contents of your comment. :)
Bill
@Timothy Baldridge: That's only personal preference, I find it very intuitive.
nico
A: 

Under linux, there is geany which might correspond to the 'simple yet powerful' description, but the auto-completion is lacking in my opinion - you always have to draw the line when designing a 'simple' IDE.. when does it stop being simple?

Anyways, the concept of project is almost absent from it. The symbols are generated from the open files.

JC
well... I'm trying geany now, but still can't find how to debug it and is there a way to force automatically save file when modified and compile before run if modified...
Nick
You would need to look for the geany debug plugin : http://plugins.geany.org/geanygdb/
JC
A: 

An IDE will almost always need some sort of project file (<-> makefile) for its business. This allows it to know what files to show in the project listing among other things. You can do one of three things:

  1. Use any IDE (QtCreator is my personal preference) or text editor (Notepad++ for Windows, stuff like gEdit and Kate on Linux) you want , and design you app so that it compiles like this (* is the asterisk aka wildcard, g++ will process every .cpp file):

    g++ -O2 *.cpp -o myprogram[.exe]

  2. Use makefiles and any text editor or IDE you want

  3. Use a cross-platform IDE like Eclipse, QtCreator, or Code::Blocks and don't care about the way it handles its internals.

1 and 3 will allow you to "just use" the debugger, 2 is a lot harder there, very dependent on the used text editor (I believe there are several Linux ones that work nicely for debugging/breakpoints as well).

rubenvb
I'd love to get Maven working with C++. I've looked at it a few times, but I haven't really dived into it. The more I think about it, the more I doubt it's more useful than gmake. :-/
Chris Kaminski