I'm trying to use a header to declare some Macros for the pre-processor and use them in the code file.
That's my header : error.h
#ifndef PROJET_MODULE_H
#define PROJET_MODULE_H
#define TESTMACRO 5
#endif
and the code file : error.c
#include <error.h>
#include <stdio.h>
int main(){
printf("%d\n", TESTMACRO);
return 0;
}
And I get this error :
‘TESTMACRO’ undeclared (first use in this function)
I've tried to compile doing :
gcc error.c -o error
and
gcc error.h error.c -o error
Both gave me the error.. Any help appreciated, thanks