undefined reference to - own library

Hi, I tried make simple library with one function but I already have problem with error undefined reference to `hello' and I dont know why.
main.c
1
2
3
4
5
6
7
8
9
  #include <stdio.h>
#include "hello.h"

int main()
{
  hello();
  return 0;
}

hello.c
1
2
3
4
5
6
7
#include <stdio.h>
#include "hello.h"

void hello(void)
{
  printf("Hello user 4");
}

hello.h
 
void hello(void);
How are you linking it?
Topic archived. No new replies allowed.