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