Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C++ API error: initializePlugin function could not be found

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
2700 Views, 2 Replies

C++ API error: initializePlugin function could not be found

I am new to developing plug-ins in C++ for Maya. I compiled a hello world plugin. There were no errors in the build, but when I try to load the plug-in in Maya, I get the following error:

// Error: file: C:/Program Files/Autodesk/Maya2011/scripts/others/pluginWin.mel line 665: initializePlugin function could not be found in plug-in (helloWorld) //

I did define the initializePlugin function in my .cpp file as you can see here:
http://www.pasteall.org/34571/cpp

Any assistance would be appreciated! I'm running maya 2011 on windows vista x32 and I compiled from the Microsoft Visual C++ Express 2010 with the Microsoft SDK 7.1
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Issue solved:
I needed to add export lines in the linker. Here's the whole setup process in case anyone has trouble in the future. Change these settings in your solution properties:

configuration properties>general
target extention = .mll
platform toolset = windows7.1SDK
configuration type = .dll

configuration properties>VC++ Directories
include directories = add maya include path
library directories = add maya lib path

configuration properties>C/C++
additional include directories = add maya include path

configuration properties>C/C++>preprocessor
preprocessor definitions = add ;NT_PLUGIN;REQUIRE_IOSTREAM

configuration properties>linker>input
additional dependencies = add ;Foundation.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaAnim.lib;OpenMayaFX.lib;OpenMayaRender.lib;Image.lib

configuration properties>linker>command line
additional options = add /export:initializePlugin /export:uninitializePlugin
Message 3 of 3
Anonymous
in reply to: Anonymous

Thanks Mate,

 

You just saved my hair! Was gradually pulling it out over this 😛

 

Cheers

 

Mike

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report