OpenCascade link error in c++ using vs2017

1k Views Asked by At

I am a newbie to Open Cascade.After building occt-7.3.0-vc14-64 with cmake with no error, i added inc/ in Include Directories and added win64/vc14/libd/ in Library Directories, then added only "include" in main.cpp. But after clicked debug button, i got link error as following:

Error   LNK2019 unresolved external symbol "public: __cdecl 
Standard_OutOfMemory::Standard_OutOfMemory(char const * const)" (?? 
0Standard_OutOfMemory@@QEAA@QEBD@Z) referenced in function "public: 
void __cdecl Standard_OutOfMemory::`default constructor closure'(void)" 
(??_FStandard_OutOfMemory@@QEAAXXZ)

What else should have be done? Thanks for any help.

1

There are 1 best solutions below

2
On BEST ANSWER

This error is that can't find lib that contain Standard_OutOfMemory.

Standard_OutOfMemory is a class in TKernel.dll, you should add TKernel.lib to project's Additional Dependencies, like on the image below:

enter image description here