Ok I got it to build. Had a silly syntax error BUT.....
I now get this error maya:
// Error: file: C:/Program
Files/Autodesk/Maya2014/scripts/others/pluginWin.mel line 658:
initializePlugin function could not be found in plug-in (HelloWorld)
Which is weird because I have function clearly defined in my cpp file.
This is my main body.
#include "HelloWorld.h"
#include <maya/MFnPlugin.h>
MTypeId HelloWorld::id(0x00337);
void* HelloWorld::creator() { return new HelloWorld; }
MStatus HelloWorld::doIt(const MArgList& argList) {
MGlobal::displayInfo("Hello There!!!");
return MS::kSuccess;
}
MStatus initializePlugin(MObject obj) {
MFnPlugin plugin(obj, "", "0.1", "Any");
MStatus status = plugin.registerCommand("helloWorld", HelloWorld::creator);
CHECK_MSTATUS_AND_RETURN_IT(status);
return status;
}
And my header:
#ifndef HELLOWORLD_H
#define HELLOWORLD_H
#include <maya/MArgList.h>
#include <maya/MObject.h>
#include <maya/MGlobal.h>
#include <maya/MPxCommand.h>
#include <maya/MTypeId.h>
class HelloWorld : public MPxCommand {
public:
HelloWorld() {};
virtual MStatus doIt(const MArgList&);
static void* creator();
static MTypeId id;
};
#endif
On Friday, 19 September 2014 17:28:20 UTC+10, Jeremy YeoKhoo wrote:
>
> Hey guys,
>
> I know it's a python thread, but do any of you have any experience of
> compiling a C++ plugin? I am about to download a trial version of Visual
> Studio, but was wandering if I could use an older version like 2010 and a
> Studio Express. Seems like a huge program just to compile something. I am
> on a Windows 7, 64-bit machine and on Maya 2014.
>
> I found a step by step link here:
> http://www.danielloran.com/study/mp/VisualStudio2005SetUpForMayaAPI.pdf
>
> But its for Visual Studio 2005.
>
>
> -J
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/0a58b2b0-07b1-41ce-9584-c3968e4a0cd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.