Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Maya插件(v2016.5)的此生成错误疑难解答_C++_Cmake_Maya Api - Fatal编程技术网

C++ Maya插件(v2016.5)的此生成错误疑难解答

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

尝试从源代码构建此插件,但使用Visual Studio 2017:

除了在VS2017中使用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:\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.3
Python 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中提交了一个问题,插件的作者帮助我解决了这个问题,以下是我采取的步骤:

  • 重新安装VS 2012,更新4()
  • 通过文档重新生成此插件的解决方案/项目
  • 从Visual Studio中的mmSolver项目的“附加包含目录”中删除了
    C:\MinGW
  • icons\CMakeLists.txt
    中的
    命令rcc-binary resources.qrc-o resources.rcc
    替换为
    命令C:/Python27/Lib/site packages/PyQt4/pyrcc4.exe-o resources.rcc.qrc
    (无论如何,我必须为
    斯芬克斯构建做类似的事情)
  • 在做了所有这些之后,我重新编译了这个解决方案,它似乎起作用了?虽然有很多警告,希望这些都是意料之中的/

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


    有关更多信息,请参阅我在此处提交的问题:

    请将您遇到的错误(至少是第一个错误)直接添加到问题帖子中。这是堆栈溢出的要求,到pastebin(或其他站点)的链接不足以满足此要求。另见。嗨@Tsyvarev,谢谢你的通知。我已经从我的pastebin链接中添加了一个错误片段