title: cocos2d-x undefined reference
body: <p>Looking for some help,Iam new to cocos2dx and having error.iam using <strong>Eclipse IDE</strong></p>
  
  <p><strong>inside HelloWorld.cpp iam doing this:</strong></p>
  
  <pre><code>_backgroundNode = CCParallaxNodeExtras::node();
  </code></pre>
  
  <p>and it gives me undefined reference error which is as follows</p>
  
  <p>undefined reference to 'CCParallaxNodeExtras::node()'</p>
  
  <p><strong>My CCParallaxNodeExtras.h header file code is as follows it inherits CCParallaxNode</strong> </p>
  
  <pre><code>using namespace cocos2d;
  #include "cocos2d.h"
  
  class CCParallaxNodeExtras : public cocos2d::CCParallaxNode {
  
      public :
  
      // Need to provide a constructor
      CCParallaxNodeExtras();
  
      // just to avoid ugly later cast and also for safety
      static CCParallaxNodeExtras* node();
  
      // Facility method (it’s expected to have it soon in COCOS2DX)
      void incrementOffset(CCPoint offset, CCNode* node);
  };
  
  #endif
  </code></pre>
  
  <p><strong>here is the CCParallaxNodeExtras.cpp</strong> </p>
  
  <pre><code>#include "CCParallaxNodeExtras.h"
  using namespace cocos2d;
  
  // Hack to access CCPointObject (which is not a public class)
  class CCPointObject  : cocos2d::CCObject {
      CC_SYNTHESIZE(cocos2d::CCPoint, m_tRatio, Ratio)
      CC_SYNTHESIZE(cocos2d::CCPoint, m_tOffset, Offset)
      CC_SYNTHESIZE(cocos2d::CCNode *, m_pChild, Child)   // weak ref
  };
  
  // Need to provide a constructor
  CCParallaxNodeExtras::CCParallaxNodeExtras() {
      cocos2d::CCParallaxNode(); // call parent constructor
  }
  
  CCParallaxNodeExtras* CCParallaxNodeExtras::node() {
      return new CCParallaxNodeExtras::CCParallaxNode();
  }
  
  void CCParallaxNodeExtras::incrementOffset(cocos2d::CCPoint offset,CCNode *node){
      for( unsigned int i = 0; i &lt; m_pParallaxArray-&gt;num; i++) {
          CCPointObject *point = (CCPointObject *)m_pParallaxArray-&gt;arr[i];
          CCNode *curNode = point-&gt;getChild();
          if( curNode-&gt;isEqual(node) ) {
              point-&gt;setOffset( ccpAdd(point-&gt;getOffset(), offset) );
              break;
          }
      }
  }
  </code></pre>
  
  <p>Please Reply, I Know there is a lot of code above but i want to know if iam doing anything wrong.Any Help or suggesstion will be appreciated.Thanks!</p>
  
  <p>Regards,
  Muhammad Tahir Ashraf</p>