I set up maya API in Microsoft Visual Studio 2008,so I create it manually.
However when I build it,
if /export:initializePlugin /export:uninitializePlugin is added in Linker>CommandLine,
errors occurs:
1>LINK : error LNK2001: unresolved external symbol initializePlugin
1>LINK : error LNK2001: unresolved external symbol uninitializePlugin
if /export:initializePlugin /export:uninitializePlugin not added,the Compiling process successfully,but maya can't loaded,
Error: initializePlugin function could not be found in plug-in.
I don't know where's the problem, anyone can help me,thanks very much in advance:)
this is my set up process in detail:
first, in the Tools Options in VC++Directories I set the maya include and lib Directories.
then I create Visual C++ Win32 Project with application type set to DLL and Empty project checked.
after that I added C++ class to the project.
in Configuration Manager:
C/C++>General>Additional Include Directorie: I set "D:\Program Files\Autodesk\Maya2008\include"
C/C++ > Preprocessor > Preprocessor Definitions:I add WIN32;NDEBUG;_WINDOWS;NT_PLUGIN
Linker>General :I change the extension of the Output File to .mll (instead of .dll)
Linker>Input: In Additional Dependencies,I add the following libraries:
Foundation.lib OpenMaya.lib OpenMayaUI.lib OpenMayaAnim.lib OpenMayaFX.lib OpenMayaRender.lib Image.lib opengl32.lib
Linker>CommandLine: I added: /LIBPATH:"D:\Program Files\Autodesk\Maya2008\lib"
/export:initializePlugin /export:uninitializePlugin
and I've made sure the Runtime Lib set to Multi_threaded.