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; }
where myheaders.h looks like:Code:#include <stdio.h> #include "myheaders.h" int main (void) { int a = 3; int b = 4; printf ("%d\n", sum (a,b)); return 0; }
shall I just ...Code:int sum (int a, int b);
gcc -c main.c
gcc -c sum.c
gcc -o finalprog sum.c main.c
???
thx thx !!!