Hello again!
Today I’m going to write a few instructions to setup a C++ project on Visual Studio 2010 so you can create a compile a plugin for Maya 2014.
First thing. Make sure that Visual Studio has the Service Pack 1 installed. Otherwise, even with everything perfectly set up you may get this error when building: LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
The Plugin wizard doesn’t work, at least for me, so I’ll explain how to setup an empty C++ project and make it work with the Maya API.
I’m working on Windows 7 x64 so make sure the VS project is set for x64.
To get to the Project Properties on Visual Studio you can either righ click on the Project in the Solution Explorer or click on Project>Properties in the menu.
First thing we need to do is go to “Configuration Properties” “General” and set “Target Extension” to “.mll” and make sure that “Configuration Type” is set to “Dynamic Library (dll)”.
Then, on “VC++ Directories” add the following directories:
- On “Executable Directories” add “C:\Program Files\Autodesk\Maya2014\bin”
- On “Include Directories” add “C:\Program Files\Autodesk\Maya2014\include”
- On “Library Directories” add “C:\Program Files\Autodesk\Maya2014\lib”
Next on “C/C++” and “General” add “C:\Program Files\Autodesk\Maya2014\include” on “Additional Include Directories”.
Next make sure “NT_PLUGIN” is on “C/C++” “Preprocessor” “Preprocessor Definitions” list.
Then on “Linker” “General” add the path “C:\Program Files\Autodesk\Maya2014\lib” to the “Additional Library Directories”.
Next, on “Linker” “Input” add the following libs to the “Additional Dependencies” list:
OpenMaya.lib
OpenMayaAnim.lib
OpenMayaRender.lib
OpenMayaFX.lib
Foundation.lib
OpenMayaUI.lib
Image.lib
You don’t need them all if you are writting simple plugins and may need additional if you are writting something specific. But those are enough for a simple deformer plugin.
And that is all. This should be enough for your plugin to compile.
Hope that helped.
Jose out.