So... let's say I have a program (main.c) which adds two integers by calling a function sum() :

Code:
int sum(int a, int b)
{
   return a + b;
}

Code:
#include <stdio.h>
#include "myheaders.h"

int main (void)
{
   int a = 3;
   int b = 4;

   printf ("%d\n", sum (a,b));

   return 0;
}
where myheaders.h looks like:
Code:
int sum (int a, int b);
shall I just ...

gcc -c main.c
gcc -c sum.c
gcc -o finalprog sum.c main.c

???

thx thx !!!