Hi
Ok im not sure if I need to be on a hardcore c++ board for this, but thought id ask here first as its Maya Api oriented. I must preface this by mentioning that im a c++ beginner and im digging my way through c++ and the api at the moment.
So, I'm having serious issues getting a simple maya plugin to compile. I have done the standard simpleNode, as all beginners do :), and it came to compiling it. This was 3 days ago and i havent been able to do it since. I can upload my code, but honestly its almost exaclty the same as the generated mayaWizard dependency node code.
i have tried Visiual Studio express 2010, 2008 and 2005 and also Visual Studio 2008 (90 day trial) and all of these dont seem to work for varying reasons.
VS Exp 2010 just wouldnt work with the plugin wizard, so i left that. 2005 express and 2008 (express and standard) both spit out tons of linking errors. Now, i have included the maya lib and include folders in the VC directories. also i downloaded the windows SDK as i read that Express doesnt have windows based headers. Ive been through tons of posts regarding similar issues other people have had but nothing seems to work. I've tried including various headers and preprocessor definitions, but im starting to lose my mind a bit... i just want to comile a simple plug-in!!!!!
I'm getting the feeling that something is ether very wrong or im missing something.... I'd bet on the latter.
Any help, AT ALL!, would be awesome.
.... heres my VS error output
1>Linking...
1>simpleNodeNode.obj : error LNK2005: "struct HINSTANCE__ * MhInstPlugin" (?MhInstPlugin@@3PAUHINSTANCE__@@A) already defined in pluginMain.obj
1>simpleNodeNode.obj : error LNK2005: _MApiVersion already defined in pluginMain.obj
1>simpleNodeNode.obj : error LNK2005: _DllMain@12 already defined in pluginMain.obj
1> Creating library Debug/simpleNode.lib and object Debug/simpleNode.exp
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MObject::~MObject(void)" (__imp_??1MObject@@QAE@XZ) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall MObject::~MObject(void)" (__imp_??1MObject@@QAE@XZ)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFnPlugin::~MFnPlugin(void)" (__imp_??1MFnPlugin@@UAE@XZ) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MStatus::MStatus(class MStatus const &)" (__imp_??0MStatus@@QAE@ABV0@@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall MStatus::perror(char const *)const " (__imp_?perror@MStatus@@QBEXPBD@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MStatus::operator bool(void)const " (__imp_??BMStatus@@QBE_NXZ) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MString::~MString(void)" (__imp_??1MString@@QAE@XZ) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall MString::~MString(void)" (__imp_??1MString@@QAE@XZ)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MStatus & __thiscall MStatus::operator=(class MStatus const &)" (__imp_??4MStatus@@QAEAAV0@ABV0@@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MStatus __thiscall MFnPlugin::registerNode(class MString const &,class MTypeId const &,void * (__cdecl*)(void),class MStatus (__cdecl*)(void),enum MPxNode::Type,class MString const *)" (__imp_?registerNode@MFnPlugin@@QAE?AVMStatus@@ABVMString@@ABVMTypeId@@P6APAXXZP6A?AV2@XZW4Type@MPxNode@@PBV3@@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MString::MString(char const *)" (__imp_??0MString@@QAE@PBD@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall MString::MString(char const *)" (__imp_??0MString@@QAE@PBD@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MFnPlugin::MFnPlugin(class MObject &,char const *,char const *,char const *,class MStatus *)" (__imp_??0MFnPlugin@@QAE@AAVMObject@@PBD11PAVMStatus@@@Z) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MStatus::MStatus(void)" (__imp_??0MStatus@@QAE@XZ) referenced in function "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>pluginMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MStatus __thiscall MFnPlugin::deregisterNode(class MTypeId const &)" (__imp_?deregisterNode@MFnPlugin@@QAE?AVMStatus@@ABVMTypeId@@@Z) referenced in function "class MStatus __cdecl uninitializePlugin(class MObject)" (?uninitializePlugin@@YA?AVMStatus@@VMObject@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MPxNode::MPxNode(void)" (__imp_??0MPxNode@@QAE@XZ) referenced in function "public: __thiscall simpleNode::simpleNode(void)" (??0simpleNode@@QAE@XZ)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MPxNode::postConstructor(void)" (?postConstructor@MPxNode@@UAEXXZ)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::getInternalValueInContext(class MPlug const &,class MDataHandle &,class MDGContext &)" (?getInternalValueInContext@MPxNode@@UAE_NABVMPlug@@AAVMDataHandle@@AAVMDGContext@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::setInternalValueInContext(class MPlug const &,class MDataHandle const &,class MDGContext &)" (?setInternalValueInContext@MPxNode@@UAE_NABVMPlug@@ABVMDataHandle@@AAVMDGContext@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::getInternalValue(class MPlug const &,class MDataHandle &)" (?getInternalValue@MPxNode@@UAE_NABVMPlug@@AAVMDataHandle@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::setInternalValue(class MPlug const &,class MDataHandle const &)" (?setInternalValue@MPxNode@@UAE_NABVMPlug@@ABVMDataHandle@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall MPxNode::internalArrayCount(class MPlug const &,class MDGContext const &)const " (?internalArrayCount@MPxNode@@UBEHABVMPlug@@ABVMDGContext@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall MPxNode::copyInternalData(class MPxNode *)" (?copyInternalData@MPxNode@@UAEXPAV1@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::legalConnection(class MPlug const &,class MPlug const &,bool,bool &)const " (?legalConnection@MPxNode@@UBE?AVMStatus@@ABVMPlug@@0_NAA_N@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::legalDisconnection(class MPlug const &,class MPlug const &,bool,bool &)const " (?legalDisconnection@MPxNode@@UBE?AVMStatus@@ABVMPlug@@0_NAA_N@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::setDependentsDirty(class MPlug const &,class MPlugArray &)" (?setDependentsDirty@MPxNode@@UAE?AVMStatus@@ABVMPlug@@AAVMPlugArray@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::connectionMade(class MPlug const &,class MPlug const &,bool)" (?connectionMade@MPxNode@@UAE?AVMStatus@@ABVMPlug@@0_N@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::connectionBroken(class MPlug const &,class MPlug const &,bool)" (?connectionBroken@MPxNode@@UAE?AVMStatus@@ABVMPlug@@0_N@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::isPassiveOutput(class MPlug const &)const " (?isPassiveOutput@MPxNode@@UBE_NABVMPlug@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MStatus __thiscall MPxNode::shouldSave(class MPlug const &,bool &)" (?shouldSave@MPxNode@@UAE?AVMStatus@@ABVMPlug@@AA_N@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual class MPlug __thiscall MPxNode::passThroughToOne(class MPlug const &)const " (?passThroughToOne@MPxNode@@UBE?AVMPlug@@ABV2@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::passThroughToMany(class MPlug const &,class MPlugArray &)const " (?passThroughToMany@MPxNode@@UBE_NABVMPlug@@AAVMPlugArray@@@Z)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual enum MPxNode::Type __thiscall MPxNode::type(void)const " (?type@MPxNode@@UBE?AW4Type@1@XZ)
1>simpleNodeNode.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MPxNode::isAbstractClass(void)const " (?isAbstractClass@MPxNode@@UBE_NXZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MPxNode::~MPxNode(void)" (__imp_??1MPxNode@@UAE@XZ) referenced in function "public: virtual __thiscall simpleNode::~simpleNode(void)" (??1simpleNode@@UAE@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MFnNumericAttribute::~MFnNumericAttribute(void)" (__imp_??1MFnNumericAttribute@@UAE@XZ) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MStatus::MStatus(enum MStatus::MStatusCode)" (__imp_??0MStatus@@QAE@W4MStatusCode@0@@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class MStatus __cdecl MPxNode::attributeAffects(class MObject const &,class MObject const &)" (__imp_?attributeAffects@MPxNode@@SA?AVMStatus@@ABVMObject@@0@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class MStatus __cdecl MPxNode::addAttribute(class MObject const &)" (__imp_?addAttribute@MPxNode@@SA?AVMStatus@@ABVMObject@@@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MStatus __thiscall MFnAttribute::setStorable(bool)" (__imp_?setStorable@MFnAttribute@@QAE?AVMStatus@@_N@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MObject & __thiscall MObject::operator=(class MObject const &)" (__imp_??4MObject@@QAEAAV0@ABV0@@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MObject __thiscall MFnNumericAttribute::create(class MString const &,class MString const &,enum MFnNumericData::Type,double,class MStatus *)" (__imp_?create@MFnNumericAttribute@@QAE?AVMObject@@ABVMString@@0W4Type@MFnNumericData@@NPAVMStatus@@@Z) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MFnNumericAttribute::MFnNumericAttribute(void)" (__imp_??0MFnNumericAttribute@@QAE@XZ) referenced in function "public: static class MStatus __cdecl simpleNode::initialize(void)" (?initialize@simpleNode@@SA?AVMStatus@@XZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MStatus __thiscall MDataBlock::setClean(class MPlug const &)" (__imp_?setClean@MDataBlock@@QAE?AVMStatus@@ABVMPlug@@@Z) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall MDataHandle::set(float)" (__imp_?set@MDataHandle@@QAEXM@Z) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MDataHandle __thiscall MDataBlock::outputValue(class MObject const &,class MStatus *)" (__imp_?outputValue@MDataBlock@@QAE?AVMDataHandle@@ABVMObject@@PAVMStatus@@@Z) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: float & __thiscall MDataHandle::asFloat(void)const " (__imp_?asFloat@MDataHandle@@QBEAAMXZ) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MDataHandle __thiscall MDataBlock::inputValue(class MObject const &,class MStatus *)" (__imp_?inputValue@MDataBlock@@QAE?AVMDataHandle@@ABVMObject@@PAVMStatus@@@Z) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall MPlug::operator==(class MObject const &)const " (__imp_??8MPlug@@QBE_NABVMObject@@@Z) referenced in function "public: virtual class MStatus __thiscall simpleNode::compute(class MPlug const &,class MDataBlock &)" (?compute@simpleNode@@UAE?AVMStatus@@ABVMPlug@@AAVMDataBlock@@@Z)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MTypeId::MTypeId(unsigned int)" (__imp_??0MTypeId@@QAE@I@Z) referenced in function "void __cdecl dynamic initializer for 'public: static class MTypeId simpleNode::id''(void)" (??\_\_E?id@simpleNode@@2VMTypeId@@A@@YAXXZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "\_\_declspec(dllimport) public: \_\_thiscall MObject::MObject(void)" (\_\_imp\_??0MObject@@QAE@XZ) referenced in function "void \_\_cdecl
dynamic initializer for 'public: static class MObject simpleNode::myInputAttr''(void)" (??__E?myInputAttr@simpleNode@@2VMObject@@A@@YAXXZ)
1>simpleNodeNode.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MTypeId::~MTypeId(void)" (__imp_??1MTypeId@@QAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'public: static class MTypeId simpleNode::id''(void)" (??__F?id@simpleNode@@2VMTypeId@@A@@YAXXZ)
1>Debug\simpleNode.mll : fatal error LNK1120: 49 unresolved externals
1>Build log was saved at "file://c:\Users\Andrew\Documents\Visual Studio 2008\Projects\simpleNode_2\simpleNode_2\Debug\BuildLog.htm"
1>simpleNode_2 - 56 error(s), 0 warning(s)