G
ganesh.kundapur
Hi,
I want to know how to compile the C source file without using the
compiler directly. I mean to say by using compiler componets such as
( cpp, cc, as, ld ).
I tried to compile the fallowing code as fallows
file name: hello.c
# include <stdio.h>
int
main ( void )
{
printf ( "Hello World\n" );
return 0;
}
cpp hello.c hello.i // Preprocessing
cc -S hello.i // Assembly code generating
as -o hello.o hello.s // generate m/c code
ld -o a.out hello.o -lc // linking
In linking phase, I'm getting warning saying that
I want to know how to compile the C source file without using the
compiler directly. I mean to say by using compiler componets such as
( cpp, cc, as, ld ).
I tried to compile the fallowing code as fallows
file name: hello.c
# include <stdio.h>
int
main ( void )
{
printf ( "Hello World\n" );
return 0;
}
cpp hello.c hello.i // Preprocessing
cc -S hello.i // Assembly code generating
as -o hello.o hello.s // generate m/c code
ld -o a.out hello.o -lc // linking
In linking phase, I'm getting warning saying that