main.c:
#include <stdio.h>
#include "test.h"
int main()
{
test();
return 0;
}
test.c:
#include "test.h"
void test()
{
printf("1");
}
test.h:
#include <stdio.h>
void test();
I use "gcc main.c", the following error occurred: /usr/bin/ld: /tmp/ccWLnzeX.o: in function main': main.c:(.text+0xa): undefined reference to
test' collect2: error: ld returned 1 exit status