Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Linking errors with example plugin? (https://simplymaya.com/forum/showthread.php?t=28599)

daviddoria 30-12-2007 02:33 PM

Linking errors with example plugin?
 
here is the example i was trying to compile with visual studio 2005:

#include <maya/MSimple.h>
#include <maya/MIOStream.h>

DeclareSimpleCommand( helloWorld, "Autodesk", "2008");
MStatus helloWorld::doIt( const MArgList& )
{
cout << "Hello World\n" << endl;
return MS::kSuccess;
}

I get about 20 of these errors:

error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MPxCommand::MPxCommand(void)" (__imp_??0MPxCommand@@QAE@XZ) referenced in function "public: __thiscall helloWorld::helloWorld(void)" (??0helloWorld@@QAE@XZ)

any suggestions?

Thanks,

David

t1ck135 30-12-2007 03:02 PM

no idea with plugins but a quick google on 'error LNK2019: unresolved external symbol' came up with a lot of stuff you should be able to trawl through

good luck :)
Simon

daviddoria 30-12-2007 03:05 PM

ok i got it working - I wasn't in "programmer" mode, I was in "follow the directions" mode, I dont know why the maya documentation doesn't explicitly say that you have to also have:

#pragma comment(lib,"Foundation.lib")
#pragma comment(lib,"OpenMaya.lib")
#pragma comment(lib,"OpenMayaFx.lib")
#pragma comment(lib,"Image.lib")
#pragma comment(lib,"OpenMayaAnim.lib")
#pragma comment(lib,"OpenMayaUi.lib")

and c:\program files\autodesk\maya2008\lib in your additional libraries... but its going now so phew!


All times are GMT. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018