Is there a difference between compiling from the linux terminal or from the IDE?

Asked

Viewed 513 times

5

I’m programming in C in the linux for a semester now, and I always come across people who call themselves better programmers because they compile and run the program through the terminal. However, in the face of various researches, I always found articles on the Internet saying that the IDE was made to help the programmer, make the time he would use by compiling all the time and running on the terminal, improve a little.

In my humble experience with both, really, I found it much easier just to compile and run through IDE. But since I’m starting in this area, I’d like to know what the difference is? Is it really better to compile by terminal? If so, why?

Note: I use codeblock.

  • 2

    The question is rather based on opinions. For example here in my work we compile the application with a script previously created to execute commands at the command line. Depending on what you want the IDE can serve yes, as long as you know what you are doing, namely how the IDE is compiling your code. Otherwise it is a matter of taste or need.

  • I understood Jorge B. As people talk a lot about the terminal, I thought it would be something that was "the right thing to do". Thank you ;)

  • 1

    Marcielli is really just a matter of taste, of course the geeks will all say it’s better to do all at the terminal, but you have the example of Android Studio that does everything for us and is very handy. But for some specific cases has even to be the hand compiling an Android app.

  • 4

    @Marciellioliveira Your question is quite valid, but seems to escape the focus of the site. But not to leave you unanswered: learn what the IDE is doing behind the scenes when you click the compile button. Once you learn this, use the compile button. There is no glory in wasting time. No one will care how much your development has been "noble" if you don’t deliver results as quickly as expected.

  • 1

    @Pablo loved that last sentence. That’s all.

  • 1

    Compiling the program from the command line I use only in specific cases, usually when I remote access my machine, because I can’t load the IDE in graphical mode. When I am programming using IDE shortcuts to compile I find it faster and convenient, but it has no problem using any of these options.

  • Thank you all. I understand that is not the focus of the site. If you think better, I delete. No problems. Anyway, they helped me a lot.

  • @Marciellioliveira I edited the question, with that title I think is more within the scope of the site. If you do not like the edition can reverse. But I think you should keep the question, it’s quite interesting.

  • I liked it Jorge, I thought it was better too. Thank you.

  • 4

    Here is relevant information about this: http://answall.com/q/101691/101

Show 5 more comments

2 answers

6


I believe it is important to know how it works on the terminal, but unless you are going to use very specific commands to compile there is no need.

The entire IDE is designed to speed up and help the programmer’s work, and many of them allow you to pass parameters before compilation.

There are several factors that differentiate a good and an "evil" programmer, writing a gcc prog.c -o prog It’s not that different from tightening play in the IDE.

  • 1

    The IDE especially helps to take away the mechanical part of development and leave the programmer free to devote to what software can’t do on its own.

  • 4

    Exactly :) There are many people who think doing it the hard way makes it better, and they could spend this time improving what really interests their projects.

  • 2

    His last comment was almost as good as the +1 response in both :)

2

The difference is more human than physical. A program compiled into an IDE may even suffer from a few differences due to "generic" parameters IDE compilation but most people do not know many parameters of their compilers to add something and here appears the human difference of programming without IDE: knowledge of the tools the IDE uses, the build process and link editing.

But life is short and the market is narrow. Reading GCC and Linker documentation can be a waste of time and money.

I just needed to learn more about code generation tools when something went wrong or an IDE was too expensive and a custom alternative was possible, so I like the lightweight and terminal IDE mix like Code::Blocks + Guake (suspended terminal) to program embedded systems and discard the Eclipse based Ides and I don’t have the money for an IAR.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.