How to complile only hello.c with gcc?
: use -c option to say not to run the linker.
: ex) gcc -c hello.c
gcc uses cpp0, cc1, as, collect2.
cpp0 = pre-processor,
cc1 = compiler,
as = assembler,
collect2 = linker.
What is the extension of shared library and static library?
: static library is .a
: shared library is .so
When you invoke GCC, it normally does preprocessing, compilation,
ReplyDeleteassembly and linking. The "overall options" allow you to stop this
process at an intermediate stage. For example, the -c option says not
to run the linker. Then the output consists of object files output by
the assembler.
To view process in compile use -v option.
ReplyDeleteyou can view pre-process, compile, asselble, link processes.