So I\'m trying trying to use a function defined in another C (file1.c) file in my file (file2.c). I\'m including the header of file1 (file1.h) in order to do this.
H
You could compile and link in one command:
gcc file1.c file2.c -o myprogram
And run with:
./myprogram
But to answer the question as asked, simply pass the object files to gcc:
gcc
gcc file1.o file2.o -o myprogram