Another Link2001 problem...

Hi,

I've installed OpenCascade v5.1. I've compiled the
CommonOCCSamplesWorkspace project, and all sub-projects in it as well.

But when I try to compile 08_ImportExport project on its own, i received the following errors. I had all the environment variables and paths set up correctly, and had compiled the mfcsample.dll etc etc.

So what is wrong?

tohdj

--------------------Configuration: ImportExport - Win32 Debug--------------------
Linking...
Creating library ../Debug/ImportExport.lib and object ../Debug/ImportExport.exp
ImportExportApp.obj : error LNK2001: unresolved external symbol "public: __thiscall OCC_MainFrame::OCC_MainFrame(int)" (??0OCC_MainFrame@@QAE@H@Z)
ImportExportApp.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall OCC_BaseApp::GetSampleName(void)" (?GetSampleName@OCC_BaseApp@@UAEPBDXZ)
ImportExportApp.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall OCC_BaseApp::GetMessageMap(void)const " (?GetMessageMap@OCC_BaseApp@@MBEPBUAFX_MSGMAP@@XZ)
ImportExportApp.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall OCC_3dApp::~OCC_3dApp(void)" (??1OCC_3dApp@@UAE@XZ)
ImportExportApp.obj : error LNK2001: unresolved external symbol "public: __thiscall OCC_3dApp::OCC_3dApp(void)" (??0OCC_3dApp@@QAE@XZ)
ImportExportApp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass const OCC_3dChildFrame::classOCC_3dChildFrame" (__imp_?classOCC_3dChildFrame@OCC_3dChildFrame@@2UCRuntimeClass@@B)
ImportExportApp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass const OCC_3dView::classOCC_3dView" (__imp_?classOCC_3dView@OCC_3dView@@2UCRuntimeClass@@B)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const OCC_3dBaseDoc::messageMap" (__imp_?messageMap@OCC_3dBaseDoc@@1UAFX_MSGMAP@@B)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::ShiftInputEvent(int,int,class Handle_V3d_View const &)" (?ShiftInputEvent@OCC_3dBaseDoc@@UAEXHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::ShiftDragEvent(int,int,int,class Handle_V3d_View const &)" (?ShiftDragEvent@OCC_3dBaseDoc@@UAEXHHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::ShiftMoveEvent(int,int,class Handle_V3d_View const &)" (?ShiftMoveEvent@OCC_3dBaseDoc@@UAEXHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::MoveEvent(int,int,class Handle_V3d_View const &)" (?MoveEvent@OCC_3dBaseDoc@@UAEXHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::InputEvent(int,int,class Handle_V3d_View const &)" (?InputEvent@OCC_3dBaseDoc@@UAEXHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OCC_3dBaseDoc::DragEvent(int,int,int,class Handle_V3d_View const &)" (?DragEvent@OCC_3dBaseDoc@@UAEXHHHABVHandle_V3d_View@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall OCC_3dBaseDoc::OCC_3dBaseDoc(void)" (__imp_??0OCC_3dBaseDoc@@QAE@XZ)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall OCC_3dBaseDoc::~OCC_3dBaseDoc(void)" (__imp_??1OCC_3dBaseDoc@@UAE@XZ)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl OCC_3dBaseDoc::Fit(void)" (__imp_?Fit@OCC_3dBaseDoc@@SAXXZ)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::ReadCSFDB(class Handle_AIS_InteractiveContext const &)" (?ReadCSFDB@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::SaveCSFDB(class Handle_AIS_InteractiveContext const &)" (?SaveCSFDB@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::ReadIGES(class Handle_AIS_InteractiveContext const &)" (?ReadIGES@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::SaveIGES(class Handle_AIS_InteractiveContext const &)" (?SaveIGES@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::ReadSTEP(class Handle_AIS_InteractiveContext const &)" (?ReadSTEP@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::SaveSTEP(class Handle_AIS_InteractiveContext const &)" (?SaveSTEP@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::SaveVRML(class Handle_AIS_InteractiveContext const &)" (?SaveVRML@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
ImportExportDoc.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CImportExport::SaveSTL(class Handle_AIS_InteractiveContext const &)" (?SaveSTL@CImportExport@@SAXABVHandle_AIS_InteractiveContext@@@Z)
../Debug/ImportExport.exe : fatal error LNK1120: 25 unresolved externals
Error executing link.exe.

ImportExport.exe - 26 error(s), 0 warning(s)

Forum supervisor's picture

Hello,

Please check that you include library mfcsample.lib to the list of link modules, in "Project>Settings>Link>Input". Please also ensure that the path to this library is included into your linkage path.

Best regards,
Forum Supervisor

tohdj's picture

Thanks Forum Supervisor!

Robert Mead's picture

Toh Da Jun,
Were you successful in solving your linking error using the solution referred to by the mail note I am replying to. I get a similar error and I was also looking for a clue on what to do next. Error message is below:

"error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QMemArray::~QMemArray(void)" (__imp_??1?$QMemArray@H@@UAE@XZ)"

Bob