Maya Plugin Wizard Error MS Visual Studio

Hello,

I’m trying to get Microsoft Visual Studio running to write plugins. I’ve followed all the installation instrutions correctly and everything seems to be in place including the environment setings and the MayapluginWizard. I’ve tried to complie the Hello World program from the Autodesk webpage:

#include <maya/MLibrary.h>
#include <maya/MIOStream.h>
#include <maya/MGlobal.h>
#include <maya/MObject.h>
int main(int /*argc*/, char **argv)
{
MStatus status;

status = MLibrary::initialize (true, argv[0], true);
if ( !status ) {
status.perror("MLibrary::initialize");
return (1);
}

// Write the text out in 3 different ways.
cout << "Hello World! (cout)\n";
MGlobal::displayInfo("Hello world! (script output)" );
MGlobal::executeCommand( "print \"Hello world! (command script output)\\n\"", true );

MLibrary::cleanup();

return (0);
}

However, when I go to build the plugin I get the following errors:

1>c:\program files\autodesk\maya2011\include\maya\mobject.h(162 ) : error C2653: ‘MFn’ : is not a class or namespace name
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(162 ) : error C2061: syntax error : identifier ‘Type’
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(165 ) : error C2653: ‘MFn’ : is not a class or namespace name
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(165 ) : error C2146: syntax error : missing ‘;’ before identifier ‘apiType’
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(165 ) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(165 ) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int
1>c:\program files\autodesk\maya2011\include\maya\mobject.h(165 ) : warning C4183: ‘apiType’: missing return type; assumed to be a member function returning ‘int’

If anyone could help me reslove this issue that would be great as I’ve run out of ideas as to what it could be.

Many thanks in advance.

Joe

No Responses to “Maya Plugin Wizard Error MS Visual Studio”

Post a Comment