cynosure
UbuntuUser
I am new to programming and am using an ebook to learn C.
I am crafting my first program i.e "Hello World"
I compiled the program using gcc and--like the ebook described--I compiled it correctly using "gcc -c Hello.c" and got a Hello.o file.
The ebook further said that if I use "gcc Hello.c" then I will get the linked form of the file. I used the same command and got an a.out file.
So my queries are:
1) How can I link an .o file directly using gcc or any other linker?
2) What exactly needs to be done with the a.out file?
I am crafting my first program i.e "Hello World"
I compiled the program using gcc and--like the ebook described--I compiled it correctly using "gcc -c Hello.c" and got a Hello.o file.
The ebook further said that if I use "gcc Hello.c" then I will get the linked form of the file. I used the same command and got an a.out file.
So my queries are:
1) How can I link an .o file directly using gcc or any other linker?
2) What exactly needs to be done with the a.out file?
Last edited: