I have written a c code file called \"utilfunc.c\" this code contains my functions that I will use through my code.
Now when I am compiling my \"utilfunc.c\" file an
Add -c to your compiler invocation, so that you only compile the translation unit but do not link it to a complete program:
-c
gcc -c -o foo.o foo.c