-1

I wanted to know ,why still use GCC and editors (i.e.vim or Emacs ), if there are full ides?

Because I found so many people, and sites still explain programming using GCC

I don't want you to feel bored I just want simple answers

1 Answers1

0

IDEs are just glorified editors (like emacs is). The compilation is still done by a command line compiler (very often GCC or perhaps CLANG). That compilation command is started by the IDE.

And FWIW, it is significant that most free software on Linux coded in C or C++ is using "command line" building utilities (make, gcc, autoconf....). Very few free software are developed using IDEs.

I strongly suggest looking inside existing free software source code. You'll learn a lot.

AFAIK, there is no IDE directly compiling C or C++ code. All IDEs are running some command-line oriented compiler, so it is useful to understand how the gcc compiler should be invoked (at least to configure your IDE to run gcc as needed).

My opinion is opposite to yours, I don't understand why people use IDE (with C or C++). I'm very happy with emacs (I build by pressing F8 there -bound to M-x recompile- and go to the next error site with F10 -bound to M-x next-error-. Got that with a couple of lines in my ~/.emacs file.). And emacs already has some auto-completion with ESC /. Occasionally I start the debugger under emacs with M-x gdb or a shell under emacs with M-x shell.

See also this answer with more detailed hints.

Community
  • 1
  • 1
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
  • so it's mainly for making ides. And it's better to code software in linux using "command line" building utilities ?. – Mohamed Abdelraouf Sep 01 '13 at 11:36
  • My opinion is that IDE are useless when coding in C or C++ (unless you count `emacs` as an IDE, which I don't). – Basile Starynkevitch Sep 01 '13 at 11:37
  • I don't understand your *"so it's mainly for making IDEs"* sentence. What do you mean? – Basile Starynkevitch Sep 01 '13 at 11:39
  • so you mean that you'll be more productive and do more advanced staff with command line, don't you ? – Mohamed Abdelraouf Sep 01 '13 at 11:40
  • 1
    Yes, I am familiar with many command line utilities. And the decisive advantage of commmand line utilities is that you can combine them (using shell features like pipe, redirection, shell-scripting, shell functions, etc...). And most GCC developers are using command line utilities (with `emacs` or `vim`) – Basile Starynkevitch Sep 01 '13 at 11:40
  • But why Emacs?? I heard that Vim is more flexible or better than Emacs or I am wrong with that . – Mohamed Abdelraouf Sep 01 '13 at 11:45
  • 1
    `emacs` vs `vim` is a matter of taste and philosophy. I start one `emacs` (in the morning, till end of work day) and run a lot of things under it. I prefer `emacs` to `vi` (which I sometimes use for sysadmin editing tasks). `emacs` is probably more flexible than `vim` (because you can script `emacs` in Elisp). – Basile Starynkevitch Sep 01 '13 at 11:46