Hi.
I’m trying to learn C++ for Maya. After compiled helloWorldCmd.cpp that came with Maya 2012 devkit, I get this error when trying to load it.
// Error: initializePlugin function could not be found in plug-in (helloWorldCmd) //
The comments in the code itself says
// This plugin uses DeclareSimpleCommand macro
// to do the necessary initialization for a simple command
// plugin with one argument.
So the DeclareSimpleCommand failed to do the initialization? Here’s the code without comments
#include <maya/MIOStream.h>
#include <maya/MSimple.h>
DeclareSimpleCommand( hello, PLUGIN_COMPANY, "4.5");
MStatus hello::doIt( const MArgList& args )
{
cout<<"Hello "<<args.asString(0).asChar()<<endl;
return MS::kSuccess;
}
I’m using Visual Studio 2010
Platform Toolset is set to Windows 7.1 SDK (had both 32 and 64 bit installed)
Maya 2012 Sp1 64 bit.