C++ Maya插件(v2016.5)的此生成错误疑难解答
尝试从源代码构建此插件,但使用Visual Studio 2017: 除了在VS2017中使用x64_x86 Cross Tools命令提示符外,我一直遵循它的指示,但在尝试构建时,我不断遇到这些错误 错误预览:C++ Maya插件(v2016.5)的此生成错误疑难解答,c++,cmake,maya-api,C++,Cmake,Maya Api,尝试从源代码构建此插件,但使用Visual Studio 2017: 除了在VS2017中使用x64_x86 Cross Tools命令提示符外,我一直遵循它的指示,但在尝试构建时,我不断遇到这些错误 错误预览: 13>------ Build started: Project: mmSolver, Configuration: Debug x64 ------ 13>Building Custom Rule C:/Users/Desktop02/Documents/mayaMat
13>------ Build started: Project: mmSolver, Configuration: Debug x64 ------
13>Building Custom Rule C:/Users/Desktop02/Documents/mayaMatchMoveSolver2017/CMakeLists.txt
13>pluginMain.cpp
13>C:\MinGW\include\stdio.h(38): warning C4068: unknown pragma
13>C:\MinGW\include\msvcrtver.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\w32api.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\sdkddkver.h(35): warning C4068: unknown pragma
13>C:\MinGW\include\w32api.h(184): warning C4005: '_EXTERN_C' : macro redefinition
13> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\yvals.h(472) : see previous definition of '_EXTERN_C'
13>c:\mingw\include\sys/types.h(34): warning C4068: unknown pragma
13>C:\MinGW\include\stdio.h(260): error C2143: syntax error : missing ';' before '*'
13>C:\MinGW\include\stdio.h(260): warning C4229: anachronism used : modifiers on data are ignored
13>C:\MinGW\include\stdio.h(260): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:\MinGW\include\stdio.h(260): error C2377: 'FILE' : redefinition; typedef cannot be overloaded with any other symbol
13> C:\MinGW\include\stdio.h(220) : see declaration of 'FILE'
13>C:\MinGW\include\stdio.h(261): error C2143: syntax error : missing ';' before '*'
13>C:\MinGW\include\stdio.h(261): warning C4229: anachronism used : modifiers on data are ignored
13>C:\MinGW\include\stdio.h(261): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
13>C:\MinGW\include\stdio.h(261): error C2061: syntax error : identifier 'FILE'
13>C:\MinGW\include\stdio.h(262): error C2062: type 'int' unexpected
13>C:\MinGW\include\stdio.h(263): error C2062: type 'int' unexpected
完全错误:
我使用文档中描述的Visual Studio 2012 Update 5时也会出现类似的外观错误(可能没有与stdio.h
相关的错误)
我真的不知道如何进一步解决这个问题,所以如果有人能提供一些帮助/见解,我将不胜感激
一些细节:
CMake 3.17.3Python 2.7.12 Maya版本:
操作系统:Microsoft Windows 7商务版,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
合成管理器:真
窗口管理器:Windows Aero
GPU:版本:2015.11.4.11。功能级别5。
适配器:GeForce GTX 560 Ti/PCIe/SSE2
供应商编号:4318。设备ID:4608
驱动程序:nvoglv64.dll:23.21.13.9135。
API:OpenGL V.4.6。 最大纹理大小:16384*16384。 最大tex坐标:32
支持的着色器版本(顶点:5,几何体:5,像素5)。
着色器编译器配置文件:(最佳卡片配置文件)
可用的活动立体声支持:0
GPU内存限制:1024MB。
CPU内存限制:31107MB 编辑:我正在查看此线程以搜索类似的外观错误:
用户表示从MinGW读取include文件会产生问题。如果是这样的话,那么我如何从使用MSVC(?)文件而不是MinGW切换到VS2017?我是否可以使用cmake命令添加一些内容来强制更改它?我在原始repo中提交了一个问题,插件的作者帮助我解决了这个问题,以下是我采取的步骤:
C:\MinGW
icons\CMakeLists.txt
中的命令rcc-binary resources.qrc-o resources.rcc
替换为命令C:/Python27/Lib/site packages/PyQt4/pyrcc4.exe-o resources.rcc.qrc
(无论如何,我必须为斯芬克斯构建做类似的事情)
+平台:win64 mayaversation:2016 mayaMatchMoveSolver 0.3.6
行更改为+平台:win64 mayaversation:2016.5 mayaMatchMoveSolver 0.3.6
,这使得所有加载都很好
有关更多信息,请参阅我在此处提交的问题:请将您遇到的错误(至少是第一个错误)直接添加到问题帖子中。这是堆栈溢出的要求,到pastebin(或其他站点)的链接不足以满足此要求。另见。嗨@Tsyvarev,谢谢你的通知。我已经从我的pastebin链接中添加了一个错误片段