views:

326

answers:

12

hi I'm really frustrated, First I have no idea how to code the very complex (make files), so I'm using IDE's that would ease the job for me like (netbeans , eclipse ,Kdevelop .. etc) i almost tried every thing starting with

  • Emacs (i'm very slow on it and I need autocompletion)
  • Netbeans 6.9.1 (crashes , very slow editor,but amazing and very easy in project creation)
  • Eclipse (fast editor, i just hate the project configurations even in php it was so annoying)
  • Kdevelop(I couldn't even get through the Hello world , configuration and Cmake issues "no executable specified " :S :S
  • code blocks not so many ppl recommends it
  • anjuta the code completion really sux

you might think i'm lazy or give up quickly but I swear I've searched alot and read the pooooooor tutorials of each one that is bloated with much information that no body needs for getting started.And I think we're really in lack of good documentation in the world of programming. and you can very much see that in (Boost library website) I really hope someone gives me helpful method on how to survive all this mess.

either I'll end up reading CMAKE details that i don't need , and memorize EMACS short cuts (CTRL x CTRL bla bla) and give up the idea of the comfortable easy to use IDEs in 2010 !


After thankfully very good answers , I think it's a must That I read about CMAKE , makefiles concepts. then half of my problems will go away , And I think now using IDE's that blind me from understanding the "Make" things isn't going to be helpful as i'm planning for long term development on linux

thanks for the brilliant simple answers.

p.s (Qt creator is awesome !! it's so much MAC like neat, clean and user friendly )


10 days later: goin old school and using EMACS and CMAKE

+9  A: 

maybe you can try qt creator, it designed for developing QT application, however you can use it for other c++ program. It supports cmake.

emailhy
+1. I have tried them all and I like QtCreator for all (Qt and non-Qt) my C++ development. Its relatively un-bloated and fast unlike some of them, but still has *working* implementations of the important features an IDE should have (code-completion, graphical debugging, etc.) unlike others.
Jason
+4  A: 

You are wrong about code::blocks.

I've tried most of what you list, but ended up, and is now using code::blocks.

[edit]

If you are really interested in easy UI-development, look at Ultimate++

slashmais
@slashmais does code::blocks use make files , cause i doubt , i heard it uses a technique like microsoft VS
ismail marmoush
ismail marmoush you are right code::blocks uses similar project files to VS as its native format, but has also support for building project using custom Makefile. Just mark "This is a custom Makefile" in Project->Properties->Project settings.
Zuljin
+1  A: 

Hmm.. Have you checked which version of the JVM you have installed? I use both Eclipse (with CDT) and Netbeans (this is a brilliant C++ IDE IMHO). I've had issues with Eclipse (typically indexing hundreds of files can sometimes cause it to run out of memory, but you can get around that using command line options to control how much memory the JVM can use).

For the sake of self improvement, I suggest you read a tutorial on makefiles anyway, there's lots out there and google is your friend. Irrespective of how good an IDE is at coming up with makefiles, typically if you're contributing source to a repository, it's difficult to use the generated makefiles.

Nim
A: 

the alternative is to look at using good editors and combine this with using semi automatic build systems

  • the classic is autoconf / automake .... if you plan to write truly portable stuff then this is the place to be. It has a steepish learning curve but works. It is the universal build system of open source

  • boost has a build system called jam, this is very good

I am sure there are others

For the record I use slickedit with auto* and plain ole gdb

pm100
+1  A: 

I also tried several IDEs. Including eclipse and everything. In the end I just stayed with emacs (the X version) and automake/autoconf. For me it is the fasted way to create something. Also, it works on almost every machine and is most of the time already installed or easy to install.

I agree it has a steep learning curve but when you finally have a simple hello world type of application you can reuse the makefiles for bigger projects.

For automake/autoconf I used the following sites to learn it:

For emacs I just followed the included tutorial. Besides, you do not need to remember that much key strokes to begin using the X version of emacs.

(BTW: autocompletion for emacs is asked here )

rve
very useful thanks alot
ismail marmoush
+2  A: 

for emacs, you can try cedet-semantic(code completion), ecb(code browser) and yasnippet.

barism
+3  A: 

I found these IDE's useful on Linux:

  • QtCreator
  • CodeLite
  • Code Blocks

Btw, if you plan to do more Linux development in the future then understanding make files is a must. To help you get started, here's the simplest example:

SOURCES=main.cpp hello.cpp

all:
    g++ $(SOURCES) -o hello

Note: use an actual TAB instead of 4 spaces in front of the g++ .. line.

That's it.

StackedCrooked
Also handy is that Code::Blocks is available for multiple platforms. I stick to it mostly on windows, but whenever I need to slap something together under Linux, it's never that hard because I'm already familiar with the IDE.
GigaWatt
QtCreator looks promising and neat
ismail marmoush
+1  A: 

Although you are looking for something related to an IDE and generating make files.. etc.. I prefer the simplicity and syntax high-lighing of "vim"

Dalton Conley
simplicity of vim? seriously? let's get something compiling and running before we delve into that beast. i'm not saying it isn't good, but it's no beginner's tool.
Mark
I'm talking IDE design wise. If you compare VIM .. (its a command line application) to an IDE such as netbeans .. its basic features of editing/creating new files are pretty simple.
Dalton Conley
+1  A: 

You should give kdevelop another try, it is really worth it! The 4.x versions offer a very good C++ code completion and coding assistance. I thing your problem is, that you have to create a 'Launch Configuration' for your 'Hello world' example first (have a look at Run->Configure Launches...)

Ludger Sprenker
A: 

I went through the same pain. I wanted to use both the windows and linux versions so I could do cross platform work.

  • I could not get code blocks to work at all and got no help on their forums.
  • I used eclipse for a while but the debugger never worked under windows and it was not very usable for me. Not intuitive and difficult to use.
  • I finally settled on netbeans. I got the debugger working under windows but it was painful. It has many warts but at least it will compile and debug on both platforms. They are actively improving it based on user feedback

I may end up trying to pick a better ide that can cross compile instead.

Jay
A: 

For autocomplete in emacs, I use (in my .emacs file):

(require 'completion)
(global-set-key "\C-\\"  'complete)

It needs at least three characters, and then searches backwards for the first similarly named token. (You may also want to enable font-locking and C++ mode.)

Emacs does have a long learning curve. But it is quite powerful, extraordinarily customizable, and extremely useful. You can always start with just a small subset of the commands and grow from there. There is a built-in tutorial mode (Ctrl-h t). And things like (Ctrl-h B) or (Ctrl-h k) will help you find out what various keys are doing.

For simple test programs, to compile under TCSH, I use:

alias tgcc 'g++ \!:* -o \!:1:r -Wall ; if ( $status == 0 ) ./\!:1:r'
tgcc foo.C

For more complex systems, makefiles are essential! There's very good documentation on the GNU-Make system via emacs "info" under fedora (and other flavors) of linux. Or try:

http://www.gnu.org/software/make/manual/make.html

By and large, makefiles become complex over time. They don't often start out that way. We have a set of source files. A set of object files derived from those source files, often via a simple substitution rule. Libraries derived from subsets of those object files. Binaries derived from various object files and libraries. Perhaps test programs that run on those binaries. Perhaps test-output that we want to compare the test programs against for regression testing. Perhaps sets of files we want to package up into a tarbar. Perhaps sets of files that we want to remove when cleaning up. Etc.

The rules are simple. You define sets of data (typically filenames), rules for applying sets of commands to create new data (again, typically filenames) from existing data (files), and dependencies so you know when to recreate.

Seriously, read the manual, start out simple, and build from there...

PS: Try adding these rules (not as the first rule!) to your (GNU) makefile:

echo-%:
        @echo $* == "\"$($*)\""

echoraw-%:
        @echo "$($*)"

Now you can say things like "make echo-CC" to see what the variable CC is set to. It's useful for debugging...

Always remember that the lines after the rule start with a tab!

Mr.Ree
A: 

Kdevelop version 4 is still not stable enough. In version 4.0 (that comes with ubuntu 10.10) the execute button is always gray, and it crashes all the time.

Try version 3 - it is very good.

VJo