无法在Visual Studio c++中使用gmsh


  1. 我下载了sdk并运行了这里描述的Windows相关命令。
  2. 然后我创建了一个新的vc++项目,并复制了该sdk (t1.cpp)中包含的教程文件的内容。
  3. 存在编译时错误,我通过在project ->Properties->Configuration Properties->C/c++ ->General->Additional include Directories中添加gmsh.h的路径来修复。
  4. 我还包括了gmsh的路径。project ->Properties->Configuration Properties->Linker->General->Additional Libraries directory .

我仍然得到下面的错误,而试图建立项目:

LNK2019:    unresolved external symbol gmshFree referenced in function "int __cdecl gmsh::model::geo::addCurveLoop(class std::vector<int,class std::allocator<int> > const &,int,bool)" (?addCurveLoop@geo@model@gmsh@@YAHAEBV?$vector@HV?$allocator@H@std@@@std@@H_N@Z)

请告诉我这里遗漏了什么。我在Windows 10上运行Microsoft Visual Studio Community 2019 (Version 16.10.4)。

有没有加#include "并添加gmsh。配置属性>链接器在输入?要了解更多信息,您可以参考文档:创建一个使用DLL的客户端应用程序。

最新更新