I have file1.c
:
#include <stdio.h>
int main() {
file2();
}
and file2.c
:
#include <stdio.h>
int file2() {
}
I'm trying to compile file1
with gcc -o file1 file1.c file2.c
, but I'm getting the error implicit declaration of function 'file2' is invalid
.
Does anyone know what I could be missing here? file1.c
and file2.c
are both in the same folder.