Building 64-bit Maya 2012 plugins with Visual Studio 2010 Express
This is how you use Visual Studio 2010 Express to build plugins for the 64-bit version of Maya 2012.
The idea is to build a 64-bit DLL and link it against Maya’s libraries. The DLL needs to have an .mll extension: the extension of a Maya plugin.
Here is a demonstration. It is available in 1080p, and should be watched in a high enough resolution to read the text (ideally 1080p). If you’re not on Windows, then I recommend requesting it in HTML5 format (by joining Youtube’s HTML5 beta).
- start a new empty project
- add a source file
- right-click on the project and choose “properties”
- pull up the “configuration manager”
- from “active solution platform” choose “New”
- choose “x64” from the dropdown list
- return to the project properties
- set the target extension to “.mll”
- set the platform toolset to “Windows7.1 SDK”
- set the configuration type to “dynamic link library (.dll)”
- move to the VC++ Directories panel
- append “;c:\program files\autodesk\maya2012\include” to the include directories
- append “c:\program files\autodesk\maya2012\lib” to the library directories
- navigate to C/C++ and Preprocessor
- append “;NT_PLUGIN” to preprocessor definitions
- navigate to Linker and Input
- append to additional dependencies the following list: “;Foundation.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaAnim.lib;OpenMayaFX.lib;OpenMayaRender.lib;Image.lib”
Your build will now succeed.
Here are the two main resources I referred to when writing this: