I have 2 class as follows each has header file class one has a function as follows:
  int call_thread() 
  {
    pthread_create(&thread, NULL, &Print_data, NULL);
    return 0;
  }
I am trying to call this method in class 2:
void position::tick(schedflags_t flags) 
{
    call_thread();
    }
I always get an error undefined reference to 'call_thread()'. I also tried to declare it as static but it gave me an error: that is "" Static function declared but not defined"".
What am I missing?
Note: I included the header file of class 1 ofcourse.
 
     
     
    