簡體   English   中英

使用vs2017的C ++中的OpenCascade鏈接錯誤

[英]OpenCascade link error in c++ using vs2017

我是Open Cascade的新手。用cmake正確構建occt-7.3.0-vc14-64之后,我在Include Directories中添加了inc /並在Library Directories中添加了win64 / vc14 / libd /,然后僅添加了“ include”在main.cpp中。 但是單擊調試按鈕后,我得到如下鏈接錯誤:

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)

還應該做什么? 謝謝你的幫助。

該錯誤是找不到包含Standard_OutOfMemory

Standard_OutOfMemoryTKernel.dll的類,您應該將TKernel.lib添加到項目的Additional Dependencies ,如下圖所示:

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM