0

I'm just looking at the g++ help pages, it says it offers -E(preprocess only), -S(compile only) and -c(compile and assemble).

I understand the difference between preprocessing and compiling. But I've never heard assembling. What is assembling and how does it differ from compiling?

doowb
  • 3,372
  • 1
  • 17
  • 25
pasha
  • 2,035
  • 20
  • 34
  • 2
    The -S option makes the compiler emit assembly language code. The -c option makes it run the assembly language code through an assembler (at least notionally) and emit an object code file. If you don't understand the meaning of these terms, look them up. –  May 17 '18 at 16:50
  • Did you mean `-c` instead of `-C`? I edited it, correct me if I'm wrong. – HolyBlackCat May 17 '18 at 16:51
  • @HolyBlackCat didn't know it was case sensitive, thanks for the correction – pasha May 17 '18 at 16:52
  • Did you read carefully the [Invoking GCC](https://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html) chapter? – Basile Starynkevitch May 17 '18 at 16:53
  • Not yet. Thanks for the link, i'll start. – pasha May 17 '18 at 16:56
  • 1
    @NeilButterworth That comment helps along with answer to https://stackoverflow.com/questions/466790/assembly-code-vs-machine-code-vs-object-code – pasha May 17 '18 at 16:57

0 Answers0