0

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!

1 Answer 1

1
  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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