Building Samples on Windows

Important: You need to set up your environment as described in Setting up your build environment before building the samples.

On Windows, the plug-in samples are located in %DEVKIT_LOCATION%\devkit\plug-ins, and the standalone application samples are located in %DEVKIT_LOCATION%\devkit\applications. Each sample is in its own dedicated directory.

To build a sample, open a command prompt and change directory to its directory.

For example, to build the circleNode plug-in, change directory to circleNode:

> cd %DEVKIT_LOCATION%\devkit\plug-ins\circleNode

To build a sample, run cmake once to generate a Visual Studio Project for the sample:

> cmake -H. -Bbuild -G "Visual Studio 14 2015 Win64"

The cmake command should exit with no errors and create a build directory.

Run cmake again to build the sample:

> cmake --build build

The executable or plug-in will be located under the build/Debug directory.

You can also build the project from within Visual Studio.

Plug-ins have the suffix mll. For example, the circleNode plug-in will be called circleNode\build\Debug\circleNode.mll.

Unlike applications that can be run from the command line, plug-ins must be loaded into Maya.

Important: Do not rebuild a plug-in that is already loaded into Maya. Unload the plug-in before you rebuild it.