separating functions into diff files
Hello, I have a pretty big file and I wanted to move the functions into other files. So far I've been compiling with
cc -o out main.c a.c
But I would like to just compile one c file. Is that possible? I was reading something about using #include, so in my main.c I have:
#include "a.h"
and in my a.h file I define my constants and functions
Code:
#define PI 3.14
void a(int N, int *M);
and in a separate a.c file I only have the function. However when I try compiling I have the error " undefined reference to 'a' " What am I doing wrong?