- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 Visual Studio 2015 中编译一个我正在制作的 DLL,它充当 C 兼容的包装器,围绕 OpenVDB 的某些功能,使其可用于现有的 C 项目。但是,当我构建时,出现以下链接器错误:
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class std::basic_streambuf<char,struct std::char_traits<char> > > __thiscall openvdb::v4_0_1::io::MappedFile::createBuffer(void)const " (__imp_?createBuffer@MappedFile@io@v4_0_1@openvdb@@QBE?AV?$shared_ptr@V?$basic_streambuf@DU?$char_traits@D@std@@@std@@@std@@XZ) referenced in function "private: void __thiscall openvdb::v4_0_1::tree::LeafBuffer<float,3>::doLoad(void)const " (?doLoad@?$LeafBuffer@M$02@tree@v4_0_1@openvdb@@ABEXXZ)
Error LNK2019 unresolved external symbol "__declspec(dllimport) class std::shared_ptr<class openvdb::v4_0_1::io::StreamMetadata> __cdecl openvdb::v4_0_1::io::getStreamMetadataPtr(class std::ios_base &)" (__imp_?getStreamMetadataPtr@io@v4_0_1@openvdb@@YA?AV?$shared_ptr@VStreamMetadata@io@v4_0_1@openvdb@@@std@@AAVios_base@5@@Z) referenced in function "void __cdecl openvdb::v4_0_1::io::readCompressedValues<float,class openvdb::v4_0_1::util::NodeMask<3> >(class std::basic_istream<char,struct std::char_traits<char> > &,float *,unsigned int,class openvdb::v4_0_1::util::NodeMask<3> const &,bool)" (??$readCompressedValues@MV?$NodeMask@$02@util@v4_0_1@openvdb@@@io@v4_0_1@openvdb@@YAXAAV?$basic_istream@DU?$char_traits@D@std@@@std@@PAMIABV?$NodeMask@$02@util@12@_N@Z)
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl openvdb::v4_0_1::io::setStreamMetadataPtr(class std::ios_base &,class std::shared_ptr<class openvdb::v4_0_1::io::StreamMetadata> &,bool)" (__imp_?setStreamMetadataPtr@io@v4_0_1@openvdb@@YAXAAVios_base@std@@AAV?$shared_ptr@VStreamMetadata@io@v4_0_1@openvdb@@@5@_N@Z) referenced in function "private: void __thiscall openvdb::v4_0_1::tree::LeafBuffer<float,3>::doLoad(void)const " (?doLoad@?$LeafBuffer@M$02@tree@v4_0_1@openvdb@@ABEXXZ)
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: static class std::shared_ptr<class openvdb::v4_0_1::math::Transform> __cdecl openvdb::v4_0_1::math::Transform::createLinearTransform(class openvdb::v4_0_1::math::Mat4<double> const &)" (__imp_?createLinearTransform@Transform@math@v4_0_1@openvdb@@SA?AV?$shared_ptr@VTransform@math@v4_0_1@openvdb@@@std@@ABV?$Mat4@N@234@@Z) referenced in function "public: static class std::shared_ptr<class openvdb::v4_0_1::math::Transform> __cdecl OpenVDB_c::LinearTransform(double,double,double,double,double,double,double,double,double,double,double,double,double,double,double,double)" (?LinearTransform@OpenVDB_c@@SA?AV?$shared_ptr@VTransform@math@v4_0_1@openvdb@@@std@@NNNNNNNNNNNNNNNN@Z)
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: void __thiscall openvdb::v4_0_1::GridBase::setTransform(class std::shared_ptr<class openvdb::v4_0_1::math::Transform>)" (__imp_?setTransform@GridBase@v4_0_1@openvdb@@QAEXV?$shared_ptr@VTransform@math@v4_0_1@openvdb@@@std@@@Z) referenced in function __catch$?setGridTransform@OpenVDB_c@@QAE_NHV?$shared_ptr@VTransform@math@v4_0_1@openvdb@@@std@@@Z$0
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class openvdb::v4_0_1::GridBase> __thiscall openvdb::v4_0_1::io::File::readGrid(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?readGrid@File@io@v4_0_1@openvdb@@QAE?AV?$shared_ptr@VGridBase@v4_0_1@openvdb@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@6@@Z) referenced in function "public: int __thiscall OpenVDB_c::readGrid(int,char *)" (?readGrid@OpenVDB_c@@QAEHHPAD@Z)
Error LNK2001 unresolved external symbol "public: virtual class std::shared_ptr<class openvdb::v4_0_1::io::Archive> __thiscall openvdb::v4_0_1::io::File::copy(void)const " (?copy@File@io@v4_0_1@openvdb@@UBE?AV?$shared_ptr@VArchive@io@v4_0_1@openvdb@@@std@@XZ)
Error LNK2001 unresolved external symbol "public: virtual void __thiscall openvdb::v4_0_1::io::File::write(class std::vector<class std::shared_ptr<class openvdb::v4_0_1::GridBase const >,class std::allocator<class std::shared_ptr<class openvdb::v4_0_1::GridBase const > > > const &,class openvdb::v4_0_1::MetaMap const &)const " (?write@File@io@v4_0_1@openvdb@@UBEXABV?$vector@V?$shared_ptr@$$CBVGridBase@v4_0_1@openvdb@@@std@@V?$allocator@V?$shared_ptr@$$CBVGridBase@v4_0_1@openvdb@@@std@@@2@@std@@ABVMetaMap@34@@Z)
Error LNK2001 unresolved external symbol "__declspec(dllimport) private: static union half::uif const * const half::_toFloat" (__imp_?_toFloat@half@@0QBTuif@1@B) C:\Users\t00001657\documents\visual studio 2015\Projects\OVDBC\OVDBC\ovdbc.obj 1
OpenVDB 及其所有依赖项都在 include 文件夹中,其目录被添加到附加包含目录中,这是我当前在链接器选项下的附加依赖项列表:
我似乎无法找到任何关于在 Visual Studio 中使用 OpenVDB 进行编译的信息来涵盖此类错误,而且我很困惑我可能会忘记什么。
最佳答案
事实证明这是几个问题的组合:
最后,我需要做的就是定义 OPENEXR_DLL、HALF_EXPORTS 和 OPENVDB_3_ABI_COMPATIBLE,并将构建选项切换为/MDd。
关于c++ - 在 DLL 中包含 OpenVDB;与 Visual Studio 2015 的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44724454/
有什么好的方法可以在 OpenVDB 中对体素网格进行下采样吗? 例如,我有 8x8x8 的网格,体素大小为 - 1.0,我想获得 4x4x4 的网格,体素大小为 - 2.0:新网格的每个体素都是原始
首先,如何使用openvdb找到最近点? 二、如果ClosestSurfacePoint这样做的正确方法是什么?如何使用? 我阅读了有关使用 OpenVDB 实现更快 NNS 的 ICP 的论文。 (
因为我不想重新发明轮子,所以我正在寻找一个好的数据结构,它可以帮助我为 3D 渲染引擎提供一个真正基本的 3D 编辑器,我基本上是在寻找一个能够存储必要的数据,在我的情况下仅限于: 几何 局部和全局坐
我有一个由 4 个 (x,y,z) 点定义的四边形(就像一个有边的平面)。我有一个 OpenVDB 网格。我想用值 1 填充四边形内的所有体素(包括边缘)。如果不手动设置四边形(有限平面)的每个体素,
我有一个 openvdb 网格,我想使用仿函数和 openvdb::tools::foreach 对其进行迭代。 //the grid I am iterating on Grid G; //the
我刚刚安装了 OpenVDB,我正在尝试编译来自 here 的基本示例(Ubuntu 14.04 + QtCreator 3.4.0 + GCC_64)。前两个例子工作得很好,但第三个例子不行——一旦
我正在尝试在 Visual Studio 2015 中编译一个我正在制作的 DLL,它充当 C 兼容的包装器,围绕 OpenVDB 的某些功能,使其可用于现有的 C 项目。但是,当我构建时,出现以下链
我是一名优秀的程序员,十分优秀!