DiscussionsIssue archiveOther usage issues

Archived discussion

OCC 5.2 linking problem with Visual C++ 7.1

Other usage issuesTue, 10/12/2004 - 17:1311 replies

Browse this forum
QuestionAuthor

hi everybody!

trying to link OCC52 to my program with Visual C++ 7.1 i get linker errors like this one:

error LNK2019: unresolved external symbol "void * * theFreeList" (?theFreeList@@3PAPAXA) referenced in function "public: static void __cdecl Standard::Free(void * &)" (?Free@Standard@@SAXAAPAX@Z)

when i rebuild TKernel module i get warnings like this:

NCollection_BaseVector.obj : warning LNK4049: locally defined symbol ?theFreeList@@3PAPAXA (void * * theFreeList) imported
NCollection_IncAllocator.obj : warning LNK4217: locally defined symbol ?theFreeList@@3PAPAXA (void * * theFreeList) imported in function "public: static void * __cdecl Standard::Allocate(int)" (?Allocate@Standard@@SAPAXH@Z)

does anyone know a solution to my problem?

thx a lot,
robert

Discussion

11 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Robert,

have you checked your project settings? I can use it without such a problem.

Greets,

Commenter-1

02Author

Thanks Patrik, but everything seems ok there. Can you rebuild TKernel.lib with the warnings (say from FoundationClasses.sln)?

greets,
robert

03Commenter-2

Hello Robert,
I've got the warnings when I rebuild the TKernel module, but I don't get the error when I linked OCC52 with my application. If you could reproduce you problem with a small application, maybe you could send it to me an I will try to rebuild it.
Good Luck,
Commenter-2.

04Author

Hi to all!

Thank you for your help. I just discovered my mistake. I didn't have the define WNT in my project settings. now i can link ...

thank you,
robert

05Commenter-3

Hi, Robert,

I have similar problem when I tried to compile the 07_Viewer3D Sample project provided by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know how you resolve this.

Many thanks

Commenter-3

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)

06Commenter-3

Hi, Robert,

I have similar problem when I tried to compile the 07_Viewer3D Sample project provided by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know how you resolve this.

Many thanks

Commenter-3

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)

07Commenter-3

Hi, Robert,

I have similar problem when I tried to compile the 07_Viewer3D Sample project provided by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know how you resolve this.

Many thanks

Commenter-3

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)

08Commenter-3

Hi, Robert,

I have similar problem when I tried to compile the 07_Viewer3D Sample project provided by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know how you resolve this.

Many thanks

Commenter-3

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)

09Commenter-3

Hi, Robert,

I have similar problem when I tried to compile the 07_Viewer3D Sample project provided by OpenCASCADE under C:\OpenCASCADE5.2\samples\standard\Mfc. I have got the following 5 link errors of the same type.

Should be grateful if you could let me know how you resolve this.

Many thanks

Commenter-3

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)

10Commenter-4

Please check your environment variable for Visual C++ (Setting up in VC+ option, With VC++7, select Options from Tools menu, then go to Projects/VC ++ Directories item)

11Commenter-3

Hi,

I have set the pathname to bin and lib of opencascade. I still got the above problem. Any more suggestions will be welcome.

Best regards,

Commenter-3