Java개발만 하다가 처음으로 VC++을 해보고 VS도 처음사용해보는데요.

Maya plug-in 개발을 해야 하는데 HelloWorld에서 오류로 하루종일 이문서 저문서 찾아보다가 질문을 드립니다.

현재 환경은 Maya2009 + VisualStudio2008입니다.

인터넷에서 문서를 찾아가며 Maya Plug-in Wizard를 설치 했고, HelloWorld 프로젝트를 생성하여 helloWorld 명령을 수행하는 아래와 같은 파일이 만들어 졌습니다.

  1. #include <maya/MSimple.h>
  2. DeclareSimpleCommand( helloWorld, "test", "2009");
  3. MStatus helloWorld::doIt( const MArgList& args )
  4. {
  5.     MStatus stat = MS::kSuccess;
  6.     setResult( "helloWorld command executed!\n" );
  7.     return stat;
  8. }
  9. 자동 생성 후 아무것도 추가나 뺀것 없이 빌드를 하려고 하면 다음과 같은 오류가 발생하며 빌드가 되지 않습니다.

    1>------ 빌드 시작: 프로젝트: HelloWorld, 구성: Release Win32 ------
    1>링크하고 있습니다...
    1>   Release/helloWorld.lib 라이브러리 및 Release/helloWorld.exp 개체를 생성하고 있습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MPxCommand::MPxCommand(void)" (__imp_??0MPxCommand@@QAE@XZ) 외부 기호(참조 위치: "public: __thiscall helloWorld::helloWorld(void)" (??0helloWorld@@QAE@XZ) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2001: "public: virtual class MStatus __thiscall MPxCommand::undoIt(void)" (?undoIt@MPxCommand@@UAE?AVMStatus@@XZ) 외부 기호를 확인할 수 없습니다.
    1>helloWorldCmd.obj : error LNK2001: "public: virtual class MStatus __thiscall MPxCommand::redoIt(void)" (?redoIt@MPxCommand@@UAE?AVMStatus@@XZ) 외부 기호를 확인할 수 없습니다.
    1>helloWorldCmd.obj : error LNK2001: "public: virtual bool __thiscall MPxCommand::isUndoable(void)const " (?isUndoable@MPxCommand@@UBE_NXZ) 외부 기호를 확인할 수 없습니다.
    1>helloWorldCmd.obj : error LNK2001: "public: virtual bool __thiscall MPxCommand::hasSyntax(void)const " (?hasSyntax@MPxCommand@@UBE_NXZ) 외부 기호를 확인할 수 없습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: virtual __thiscall MPxCommand::~MPxCommand(void)" (__imp_??1MPxCommand@@UAE@XZ) 외부 기호(참조 위치: "public: virtual __thiscall helloWorld::~helloWorld(void)" (??1helloWorld@@UAE@XZ) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MObject::~MObject(void)" (__imp_??1MObject@@QAE@XZ) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: virtual __thiscall MFnPlugin::~MFnPlugin(void)" (__imp_??1MFnPlugin@@UAE@XZ) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: void __thiscall MStatus::perror(char const *)const " (__imp_?perror@MStatus@@QBEXPBD@Z) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MString::~MString(void)" (__imp_??1MString@@QAE@XZ) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: class MStatus __thiscall MFnPlugin::registerCommand(class MString const &,void * (__cdecl*)(void),class MSyntax (__cdecl*)(void))" (__imp_?registerCommand@MFnPlugin@@QAE?AVMStatus@@ABVMString@@P6APAXXZP6A?AVMSyntax@@XZ@Z) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MString::MString(char const *)" (__imp_??0MString@@QAE@PBD@Z) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MFnPlugin::MFnPlugin(class MObject &,char const *,char const *,char const *,class MStatus *)" (__imp_??0MFnPlugin@@QAE@AAVMObject@@PBD11PAVMStatus@@@Z) 외부 기호(참조 위치: "class MStatus __cdecl initializePlugin(class MObject)" (?initializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: class MStatus __thiscall MFnPlugin::deregisterCommand(class MString const &)" (__imp_?deregisterCommand@MFnPlugin@@QAE?AVMStatus@@ABVMString@@@Z) 외부 기호(참조 위치: "class MStatus __cdecl uninitializePlugin(class MObject)" (?uninitializePlugin@@YA?AVMStatus@@VMObject@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: static void __cdecl MPxCommand::setResult(char const *)" (__imp_?setResult@MPxCommand@@SAXPBD@Z) 외부 기호(참조 위치: "public: virtual class MStatus __thiscall helloWorld::doIt(class MArgList const &)" (?doIt@helloWorld@@UAE?AVMStatus@@ABVMArgList@@@Z) 함수)에서 확인하지 못했습니다.
    1>helloWorldCmd.obj : error LNK2019: "__declspec(dllimport) public: __thiscall MStatus::MStatus(enum MStatus::MStatusCode)" (__imp_??0MStatus@@QAE@W4MStatusCode@0@@Z) 외부 기호(참조 위치: "public: virtual class MStatus __thiscall helloWorld::doIt(class MArgList const &)" (?doIt@helloWorld@@UAE?AVMStatus@@ABVMArgList@@@Z) 함수)에서 확인하지 못했습니다.
    1>Release\helloWorld.mll : fatal error LNK1120: 16개의 확인할 수 없는 외부 참조입니다.
    1>빌드 로그가 "file://c:\Documents and Settings\rslee\My Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\Release\BuildLog.htm"에 저장되었습니다.
    1>HelloWorld - 오류: 17개, 경고: 0개
    ========== 빌드: 성공 0, 실패 1, 최신 0, 생략 0 ==========

    가급적 혼자 해결해 보고자 했으나, VS자체도 처음 사용해보고 개발한지 얼마 안된 초보이다보니 해결하기가 힘이드네요.

    관련된 자료들을 찾다보니 링커설정에 관한 문제인듯한데, 현재 HelloWorld프로젝트-속성-구성속성-링커-입력에서

    추가 종속성에 Foundation.lib, OpenMaya.lib 파일을 추가해둔 상태입니다.

    바쁘시겠지만 보시고 해결 방안이 있다면 답변 부탁드리겠습니다.