Linking errors using OCC5.2 with VC++7.1

Dear All,

I should be grateful if someone can help me in resolving the following errors when I compile 07_Viewer3d project supplied by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I used VC++7.1 and set the pathname to C:\OpenCASCADE5.2\ros\win32\bin, and C:\OpenCASCADE5.2\ros\win32\lib. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know to solve this problem.

Many thanks

Xiu

Viewer3dApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass * __stdcall OCC_3dChildFrame::GetThisClass(void)" (__imp_?GetThisClass@OCC_3dChildFrame@@SGPAUCRuntimeClass@@XZ) Creferenced in function "public: virtual int __thiscall CViewer3dApp::InitInstance(void)" (?InitInstance@CViewer3dApp@@UAEHXZ)

Viewer3dDoc.obj Viewer3dApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass * __stdcall OCC_3dChildFrame::GetThisClass(void)" (__imp_?GetThisClass@OCC_3dChildFrame@@SGPAUCRuntimeClass@@XZ) Creferenced in function "public: virtual int __thiscall CViewer3dApp::InitInstance(void)" (?InitInstance@CViewer3dApp@@UAEHXZ)

Viewer3dDoc.obj : error LNK2019: unresolved external symbol "public: void __thiscall CResultDialog::SetText(class ATL::CStringT > > &)" (?SetText@CResultDialog@@QAEXAAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) Creferenced in function "public: void __thiscall CViewer3dDoc::UpdateResultMessageDlg(class ATL::CStringT > >,class TCollection_AsciiString)" (?UpdateResultMessageDlg@CViewer3dDoc@@QAEXV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@VTCollection_AsciiString@@@Z)

Viewer3dDoc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const * __stdcall OCC_3dBaseDoc::GetThisMessageMap(void)" (__imp_?GetThisMessageMap@OCC_3dBaseDoc@@KGPBUAFX_MSGMAP@@XZ) Creferenced in function _$E4

Viewer3dView.obj : error LNK2019: unresolved external symbol "public: void __thiscall OCC_MainFrame::SetStatusMessage(class ATL::CStringT > > const &)" (?SetStatusMessage@OCC_MainFrame@@QAEXABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) Creferenced in function "protected: void __thiscall CViewer3dView::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@CViewer3dView@@IAEXIVCPoint@@@Z)
../

Rajendra's picture

Lib file may be missing.

Paul Jimenez's picture

All errors point to your own code, not to OpenCASCADE. Did you implement the methods? Are you dealing with the dllimport/dllexport attributes correctly? Are you adding the import library to the linker?