Maya插件(v2016.5)的此构建错误疑难解答



尝试从源代码构建此插件,但使用Visual Studio 2017:https://github.com/david-cattermole/mayaMatchMoveSolver/blob/master/BUILD_WINDOWS.md

我遵循了它的指示,除了我一直在使用VS 2017的x64_x86 Cross Tools命令提示符,但我在尝试构建时不断收到这些错误

错误预览:

13>------ Build started: Project: mmSolver, Configuration: Debug x64 ------
13>Building Custom Rule C:/Users/Desktop02/Documents/mayaMatchMoveSolver2017/CMakeLists.txt
13>pluginMain.cpp
13>C:MinGWincludestdio.h(38): warning C4068: unknown pragma
13>C:MinGWincludemsvcrtver.h(35): warning C4068: unknown pragma
13>C:MinGWincludew32api.h(35): warning C4068: unknown pragma
13>C:MinGWincludesdkddkver.h(35): warning C4068: unknown pragma
13>C:MinGWincludew32api.h(184): warning C4005: '_EXTERN_C' : macro redefinition
13>        C:Program Files (x86)Microsoft Visual Studio 11.0VCincludeyvals.h(472) : see previous definition of '_EXTERN_C'
13>c:mingwincludesys/types.h(34): warning C4068: unknown pragma
13>C:MinGWincludestdio.h(260): error C2143: syntax error : missing ';' before '*'
13>C:MinGWincludestdio.h(260): warning C4229: anachronism used : modifiers on data are ignored
13>C:MinGWincludestdio.h(260): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:MinGWincludestdio.h(260): error C2377: 'FILE' : redefinition; typedef cannot be overloaded with any other symbol
13>        C:MinGWincludestdio.h(220) : see declaration of 'FILE'
13>C:MinGWincludestdio.h(261): error C2143: syntax error : missing ';' before '*'
13>C:MinGWincludestdio.h(261): warning C4229: anachronism used : modifiers on data are ignored
13>C:MinGWincludestdio.h(261): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:MinGWincludestdio.h(261): error C2061: syntax error : identifier 'FILE'
13>C:MinGWincludestdio.h(262): error C2062: type 'int' unexpected
13>C:MinGWincludestdio.h(263): error C2062: type 'int' unexpected

完全错误:https://pastebin.com/HzxLed93

我在使用Visual Studio 2012 Update 5时也出现了类似的错误,如文档中所述(可能没有关于stdio.h的错误(。

我真的不知道如何进一步解决这个问题,所以如果有人能提供一些帮助/见解,我将不胜感激。。。

一些细节:

CMake 3.17.3
Python 2.7.12

Maya版本:
操作系统:Microsoft Windows 7 Business Edition,64位Windows 7 Service Pack 1(Build 7601(

剪切ID:201603022110-988944-2
Maya版本:Autodesk Maya 2016 Extension 2
Maya API:201650
Qt版本:4.8.6
合成管理器:True
窗口管理器:Windows Aero
GPU:版本:2015.11.4.11。功能级别5。
适配器:GeForce GTX 560 Ti/PCIe/SSE2
供应商ID:4318。设备ID:4608
驱动程序:nvoglv64.dll:23.21.13.9135。
API:OpenGL V.4.6。最大纹理大小:16384*16384。最大tex坐标:32
支持着色器版本(顶点:5,几何体:5,像素5(
着色器编译器配置文件:(最佳卡配置文件(
可用的活动立体声支持:0
GPU内存限制:1024 MB
CPU内存限制:31107 MB。

编辑:我在看这个帖子,寻找类似的错误:https://forum.zdoom.org/viewtopic.php?f=3&t=13253

并且用户表示从MinGW读取包含文件将产生问题。如果是这样的话,我该如何将VS 2017从使用MSVC(?(文件而不是MinGW切换?我可以用cmake命令添加一些东西来强制它更改吗?

我在原始repo中提交了一个问题,插件的作者帮助我解决了这个问题,以下是我采取的步骤:

  1. 使用更新4重新安装VS 2012(https://my.visualstudio.com/Downloads?q=visual%20studio%202012)
  2. 通过文档为该插件重新生成了一个解决方案/项目
  3. 将CCD_ 2从";附加包含目录";来自Visual Studio中的mmSolver项目
  4. iconsCMakeLists.txt中的COMMAND rcc -binary resources.qrc -o resources.rcc替换为COMMAND C:/Python27/Lib/site-packages/PyQt4/pyrcc4.exe -o resources.rcc resources.qrc(无论如何,我必须为sphinx-build做类似的事情(

完成所有这些之后,我重新编译了解决方案,它似乎起作用了?尽管有很多警告,希望这些都是意料之中的…/

https://pastebin.com/bpf1U4vD

我看到生成了一个.mod文件和一个与你最新版本同名的目录,但仅仅复制它们并没有真正起到任何作用,所以我最终做的是获取发布zip文件并提取它,但用我端生成的文件替换了.mll插件文件。我还注意到,如果我保持.mod文件的原样,我的Maya版本仍然没有加载任何内容,所以我猜我将mod文件中的+ PLATFORM:win64 MAYAVERSION:2016 mayaMatchMoveSolver 0.3.6行更改为+ PLATFORM:win64 MAYAVERSION:2016.5 mayaMatchMoveSolver 0.3.6,这使所有内容都加载良好。

有关更多信息,请参阅我在此处提交的问题:https://github.com/david-cattermole/mayaMatchMoveSolver/issues/148

最新更新