Thread: Confusions regarding the GCC compilation steps

  1. #1
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115

    Confusions regarding the GCC compilation steps

    After preprocessing, in the second step namely "Compilation", an object file gets generated.

    I wanted to know what are the contents of an "Object file" ? Is it machine code ?

    Kindly explain !

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by AnishaKaul View Post
    ... Object file ... Is it machine code ?
    The answer is both yes and no.

    Tim S.

  4. #4
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115
    Quote Originally Posted by rags_to_riches View Post
    Thanks for replying but I had already searched Google with the similar keywords, I couldn't get my doubt clarified that's why posted here.

    The GCC manual by Richard Stallman says:
    -c
    Compile or assemble the source files, but do not link.
    and I was confusing this with the second step i.e. "compilation"

    I was thinking that the -c option performs the second step and produces the machine code !

    Now I have clarified this doubt of mine.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling GNU MP
    By mattnp12 in forum C Programming
    Replies: 3
    Last Post: 06-23-2011, 03:58 PM
  2. Undefined reference to...
    By legendus in forum C Programming
    Replies: 19
    Last Post: 10-25-2009, 06:18 AM
  3. Buidl Library with ./configure script
    By Jardon in forum C Programming
    Replies: 6
    Last Post: 07-24-2009, 09:36 AM
  4. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  5. Compilation error under Unix with GCC
    By marcusg in forum C Programming
    Replies: 2
    Last Post: 06-01-2005, 08:16 AM