2011-11-13 5 views
0

MFCでVisual Studio 2010プロジェクトを実行しました。私は新しいクラスでRUNTIME_CLASSを呼び出すときのリンクエラー

RUNTIME_CLASS(COrderContentsItem) 

だから、このクラスは、私は別の既存のからコピーされた新しいもので呼び出すときに問題が来ることを、私はdisocovered、いくつかの研究の後

2>COrderContentsItemsDocument.obj : error LNK2028: unresolved token (0A0001CA) "public: static struct CRuntimeClass * __stdcall COrderContentsItem::GetThisClass(void)" ([email protected]@@[email protected]@XZ) referenced in function "public: virtual struct CRuntimeClass * __thiscall COrderContentsItemsDocument::GetItemsRuntimeClass(void)" ([email protected]@@[email protected]@XZ) 

2>COrderContentsItemsDocument.obj : error LNK2019: unresolved external symbol "public: static struct CRuntimeClass * __stdcall COrderContentsItem::GetThisClass(void)" ([email protected]@@[email protected]@XZ) referenced in function "public: virtual struct CRuntimeClass * __thiscall COrderContentsItemsDocument::GetItemsRuntimeClass(void)" ([email protected]@@[email protected]@XZ) 

2>..\..\Output\Win32\Debug_Unicode\MindSalesManager.exe : fatal error LNK1120: 2 unresolved externals 

:私はこれらのエラーを受け取ります。だから私は問題が何であるかを知りたいと思っています。

乾杯、

答えて

0

セルジオソリューションはCOrderContentsItem.cppファイルのプロパティを変更することです。ソリューションエクスプローラで、ファイルを右クリックし、プロパティを選択し、構成プロパティ>一般で項目タイプを「C/C++ヘッダー」から「C/C++コンパイラ」に変更します。

ファイルを作成するときに間違ったことがありますか。 g。 .cppファイルの代わりに.hファイルを選択します。

関連する問題