Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have programmed in Obj C and C, but until now found that I dont fully understand the steps in taking the software from source code to executable, I found this image kind of explaining it (sorry couldn't upload as I'm new

but I still not get when the debugger, make, builder come into action, when it goes to asm and when to binary

  • are the steps the same for OOP of for procedural?
  • how about different languages? python, php, objc, C, same steps?

Thanks a lot!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted
  • The debugger doesn't do anything before runtime. Well, you need to instruct the compiler to include information for debuggers in the output if you want the debugger to be more useful, but such options just adjust details of the "compile" step.
  • make is just a tool for automating the build, i.e. specifying all those steps (and potentially more, e.g. running tests and installing the compiled program) in a file once and then kicking them off on demand with a single command.
  • What do you mean by "builder"?
  • Yes, this model works for all languages. Many language implementations work differently, including most of the most popular modern OOP languages, but that's another matter. You can definitely implement them with ahead-of-time compilation.
  • There's a difference between languages and language implementations! The main implementation of Python and PHP are more or less interpreters - strictly speaking, both compile to bytecode which then runs in a virtual machine, but that compilation happens right before execution and implicitly, and PHP doesn't even care to save that bytecode for the next run unless you use a bytecode cache. ObjC and C are generally compiled languages, i.e. similar. A third category, including e.g. Java and C#, compiles to bytecode "ahead of time" (similar to how C++ code is compiled to object files, only the output is higher-level and machine-independent), and this bytecode is compiled to machine code "just in time" (JIT), i.e. during execution.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.