title: undefined reference to a static function
body: <p>I have a strange problem when I create a static function in class A and I want to call it from class B function. I get </p>
  
  <blockquote>
    <p>undefined reference to `A::funcA(int)'</p>
  </blockquote>
  
  <p>Here is my source code : 
  a.cpp</p>
  
  <pre><code>#include "a.h"
  
  void funcA(int i) {
      std::cout &lt;&lt; i &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>a.h</p>
  
  <pre><code>#ifndef A_H
  #define A_H
  
  #include &lt;iostream&gt;
  
  class A
  {
      public:
          A();
          static void funcA( int i );
  };
  
  #endif // A_H
  </code></pre>
  
  <p>b.cpp</p>
  
  <pre><code>#include "b.h"
  
  void B::funcB(){
      A::funcA(5);
  }
  </code></pre>
  
  <p>and b.h </p>
  
  <pre><code>#ifndef B_H
  #define B_H
  #include "a.h"
  
  class B
  {
      public:
          B();
          void funcB();
  };
  
  #endif // B_H
  </code></pre>
  
  <p>I'm compiling with Code::Blocks.</p>