在Visual Studio中构建fbxsdk标头时发生编译错误 [英] Compile error when building fbxsdk headers in visual studios

查看:178
本文介绍了在Visual Studio中构建fbxsdk标头时发生编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Visual Studio构建2015年和2018年的fbxsdk标头,但出现错误:

I tried to build both 2015 and 2018 versions of fbxsdk headers with visual studios but get error:

c:\ program files \ autodesk \ fbx \ fbx sdk \ 2018.0 \ include \ fbxsdk \ core \ fbxproperty.h(1161):错误C2903:"GetPropertyValue":符号既不是类模板也不是函数模板

此代码段出现错误:

        T EvaluateValue(const FbxTime& pTime=FBXSDK_TIME_INFINITE, bool pForceEval=false)
    {
        return GetAnimationEvaluator()-> template GetPropertyValue<T>(*this, pTime, pForceEval);
    }

位于模板类中,标头的linux版本是相等的,但不会产生错误,我什至尝试mingw g ++并进行编译而没有错误(但是由于DLL不是由g ++制成而无法链接).

which is inside a template class, the linux version of the headers are equal but produce no error, and I even tried mingw g++ and compiles with no error (but can’t link due to dll not being made with g++).

那段代码甚至在做什么?创建模板并将其作为值返回?

What is that piece of code even doing? Creating a template and returning it as value?

我从函数中删除了template关键字,它开始在Visual Studio中进行编译(并且g ++开始出现错误),这会改变结果吗?

I removed the template keyword from the function and it started compiling in visual studios (and g++ started giving errors), does that changes the result?

此错误是否可能是因为我使用的是Visual Studio 2017,而不是fbxsdk库推荐的2015?除此之外,我在这里做了他们建议的所有操作: https://help.autodesk.com/view/FBX/2018/ENU/?guid=FBX_Developer_Help_getting_started_installing_and_configuring_configuring_the_fbx_sdk_for_wind_html

Could this error be caused because of me using visual studios 2017 instead of 2015 recommended by the fbxsdk library? Other than that I did everything they recommended in here: https://help.autodesk.com/view/FBX/2018/ENU/?guid=FBX_Developer_Help_getting_started_installing_and_configuring_configuring_the_fbx_sdk_for_wind_html

我从以下位置安装了库: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=26416244

I installed the library from: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=26416244

推荐答案

我刚刚遇到了相同的错误.解决方案是在配置属性"/"C/C ++/语言"中将一致性"模式切换为否".我不确定这是否会造成任何问题,但目前为止确实可以完成.

I've just encountered the same error. The solution was to switch Conformance mode to NO in Configuration Properties/ C/C++/ Language. I'm not sure if this will cause any problems down the road, but it did the job for now.

这篇关于在Visual Studio中构建fbxsdk标头时发生编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆