2012-03-04 24 views
0

私はcocos2dxフレームワークを扱うC++の初心者です。私は、dll libに含まれている関数への不適切なリンケージによって引き起こされたと思われるエラーが発生しています。LNK2019未解決の外部シンボル

スクリーンショットのライン39は、コンパイラエラー(それはコンパイルコメントアウト)このエラーの原因とどのように私はそれを解決するのですされて何

CCSize pixelSize= this->GetGridSize(); 

CCSize GetGridSize(){ 
    return CCSize(m_Width*m_CellWidth+m_CellWidth/2,m_Height*m_CellHeight+m_CellHeight/2); 
} 

void HexGrid::populate(){ 
    CCSize pixelSize= this->GetGridSize(); 
    //XDebug::odprintf(L"Grid size in pixels: %d X %d", pixelSize.width, pixelSize.height); 

    int i = 0; 
    HexCell* pCell; 
    for(unsigned int r = 0; r < m_Width; r++){ 
     for(unsigned int c = 0; c < m_Height; c++){ 
      pCell = new HexCell(this, r ,c); 
      cells.push_back(pCell); 
      XDebug::odprintf(L"Adding Cell #%d with grid XY of %dX%d",i++, r, c); 
     } 
    } 
} 

の原因は?すべてのポインタは、私が知恵の終わりでそれをグーグルで鑑賞されるようになります。

+3

さて、 'CCSize GetGridSize()'は、どのクラスのメンバーでもありません。 –

+0

ありがとう!私は本当に注意を払う必要があります。 –

答えて

1
CCSize HexGrid::GetGridSize(){ 
    return CCSize(m_Width*m_CellWidth+m_CellWidth/2,m_Height*m_CellHeight+m_CellHeight/2); 
} 
+0

私はあなたが意味すると思います: CCSize HexGrid :: GetGridSize(){ return CCSize(m_Width * m_CellWidth + m_CellWidth/2、m_Height * m_CellHeight + m_CellHeight/2); } – lassombra

+0

はい、あなたは正しいです。私は変更しました。 – ciphor

関連する問題