Windows(VS2017)编译OpenVDB失败

问题描述 投票:0回答:0

我尝试在Windows11(VS2017)上编译OpenVDB,但是出现了令人困惑的错误:

错误 C2676 二进制 '<': 'const _Ty' does not define the operator or a conversion to a type that can be received by a predefined operator openvdb_shared

Error C2056 无效表达式

错误 C2088 对类无效

指向文件,第5386行:“_NOEXCEPT_COND(_NOEXCEPT_OPER(_Left < _Right))".

#pragma warning(push)
#pragma warning(disable: 28285) // (syntax error in SAL annotation, occurs when _Ty is not an integral type)
template<class _Ty>
    _Post_equal_to_(_Left < _Right ? _Right : _Left)
    _NODISCARD constexpr const _Ty& (max)(const _Ty& _Left, const _Ty& _Right)
        _NOEXCEPT_COND(_NOEXCEPT_OPER(_Left < _Right))
    {   // return larger of _Left and _Right
    if (_Left < _Right)
        {
        _STL_ASSERT(!(_Right < _Left), "invalid comparator");
        return (_Right);
        }

    return (_Left);
    }

和另一个致命错误:

致命错误 LNK1104:无法打开文件“....\openvdb\openvdb\Debug\openvdb.lib”

我按照手册 OpenVDB 通过 git 和 vcpkg 下载 OpenVDB 源代码和依赖项。我不知道如何解决这些问题。任何建议或解决方案将不胜感激!!!

windows compiler-errors visual-studio-2017 openvdb
© www.soinside.com 2019 - 2024. All rights reserved.