Hello everyone. I created this library:
Code:
//liberr.h
void hello();
and the correspondent .c :
Code:
//liberr.c
#include <stdio.h>
void hello(){
printf("hello!!\n");
}
then i made a simple program like this:
Code:
//errtest2.c
#include "liberr.h"
#include <stdio.h>
int main(){
printf("testing...\n");
hello();
return 0;
}
but i receive this error :
"/tmp/ccub0rMj.o: In function `main':
/home/paulo/Desktop/errtest2.c:7: undefined reference to `hello'
collect2: ld returned 1 exit status"
i'm using linux. what is the problem? thanks for your help