- Open a Visual Studio Command Prompt (Start > All Programs > Microsoft Visual Studio 2010 Express > Visual Studio Command Prompt)
-
Set up the environment for 64-bit compilation:
CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release
And now you’re ready to go. For example, if you were following the basic extensions tutorial, you set some environment variables:
set ARNOLD_PATH=C:\solidangle\arnold\Arnold-4.2.2.0-windows set MTOA_PATH=C:\solidangle\mtoadeploy\2014 set MAYA_PATH="C:\Program Files\Autodesk\Maya2014"
Note that we included the quotation marks in MAYA_PATH, since the path includes an embedded space. An alternative would be to use the quotation marks in the cl and link commands.
cl /c translator1.cpp /EHsc /MD /DNT_PLUGIN /DREQUIRE_IOSTREAM /I%MAYA_PATH%\include /I%MTOA_PATH%\include /I%ARNOLD_PATH%\include
cl /c extension1.cpp /EHsc /MD /DNT_PLUGIN /DREQUIRE_IOSTREAM /I%MAYA_PATH%\include /I%MTOA_PATH%\include /I%ARNOLD_PATH%\include
link /dll extension1.obj translator1.obj /LIBPATH:%ARNOLD_PATH%\lib /LIBPATH:%MAYA_PATH%\lib /LIBPATH:%MTOA_PATH%\lib ai.lib OpenGl32.lib glu32.lib Foundation.lib OpenMaya.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib OpenMayaFX.lib mtoa_api.lib