martes, 19 de octubre de 2010

using gcc

This is a reminder for my own in the future =D

1)
-gcc -o myprogram myprogram.c; for compiling and linking just a source file
2)
-gcc -c file1.c file2.c ......... fileN.c; for compile some files.
-gcc -o myprogram file1.o file2.o ....... fileN.o; for linking and generate the binary file
3)
if you want to see asm code generated in compilation time, you have to do:
-gcc -S -c file1.c file2.c ......... fileN.c; and then just open them with your favourite text editor

No hay comentarios:

Publicar un comentario