Creating Microsoft Visual Studio 2010 Project For Maya Plug-in
Since we have to use Microsoft Visual Studio in order to compile plug-ins for Maya on Windows platform we need to create project first. This step can be boring but nevertheless it needs to be done. You can follow the steps I have written below to create your Visual Studio project.
When you complete creation of the project you will be able to compile your plug-ins for x86 platform and Maya 2011. You can change configurations to compile your projects for x64 plarform as well as different Maya versions.
Whenever I have time I will create a wizards so we can get ridd of this chore work. Long live makefile!
1. Go to File -> New -> Project.
2. Select “Visual C++” on the right hand side then select “Win32” project. Name your project and click “OK”.
3. Do not click "Finish", click next to edit application settings. Select “DLL” under “Application type” and “Empty project” under “Additional options”.
4. Create or add header and cpp files.
5. Right click project in “Solution Explorer” and choose “Properties”.
6. Select “All Configurations” under “Configurations” menu. Change “Target Extension” to “.mll”.
7. Go to C/C++ -> General -> Additional Include Directories. Add include directory of Maya installation. I keep include directory in different location but usual path would be;
C:\Program Files\Autodesk\Maya2011\include
8. Go to - C/C++ -> Preprocessor -> Preprocessor Definition. Add following lines.
10. Got o Linker -> General -> Additional Library Directories. Add lib directory of Maya installation. I keep lib directory in different location but usual path would be;
C:\Program Files\Autodesk\Maya2011\lib
11. Go to Linker -> Input -> Additional Dependencies. Add following libraries. Add other libraries as required.