3Dについて学ぼうと思い、FBXファイルを使ってみようと思ったのですが、件名にあるように、「fatal error LNK1120: 外部参照 8 が未解決です」というエラーがでてしまい、先に進めません。
状況としましては、VC++ 2010 Express を使っていて、プロジェクトのプロパティから"C/C++"の"全般"で、"追加のインクルードディレクトリ"に"fbksdk.h"の入った"include"フォルダを置き、"リンカー"の"全般"において"追加のライブラリディレクトリ"というところに"lib"フォルダを置きました。
おそらくライブラリとリンクができていないということなのでしょうが、まだ知識があいまいな点が多く、なぜなのかがわかりません。
以下にコードとエラーのログを貼らせていただきます。
情報が足りないようでしたら追加させていただきます。
非常に困っています。どうかよろしくお願いいたします。
<main.cpp>
#include<tchar.h>
#include"fbxsdk.h"
int _tmain(int argc, _TCHAR* argv[]){
//create SDK manager
FbxManager *pSdkManager = FbxManager::Create();
return 0;
}
1>------ ビルド開始: プロジェクト: HelloFBX, 構成: Debug Win32 ------
1>main.obj : error LNK2019: 未解決の外部シンボル "public: static class fbxsdk::FbxManager * __cdecl fbxsdk::FbxManager::Create(void)" (?Create@FbxManager@fbxsdk@@SAPAV12@XZ) が関数 _main で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall fbxsdk::FbxString::~FbxString(void)" (??1FbxString@fbxsdk@@QAE@XZ) が関数 "public: __thiscall fbxsdk::FbxPair<class fbxsdk::FbxString const ,class fbxsdk::FbxObject *>::~FbxPair<class fbxsdk::FbxString const ,class fbxsdk::FbxObject *>(void)" (??1?$FbxPair@$$CBVFbxString@fbxsdk@@PAVFbxObject@2@@fbxsdk@@QAE@XZ) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "void __cdecl fbxsdk::_FbxAssert(char const *,char const *,unsigned int,bool,char const *,...)" (?_FbxAssert@fbxsdk@@YAXPBD0I_N0ZZ) が関数 "public: class fbxsdk::FbxPair<class fbxsdk::FbxRedBlackTree<class fbxsdk::FbxMap<class fbxsdk::FbxString,class fbxsdk::FbxObject *,struct fbxsdk::FbxStringCompare,class fbxsdk::FbxBaseAllocator>::KeyValuePair,struct fbxsdk::FbxStringCompare,class fbxsdk::FbxBaseAllocator>::RecordType *,bool> __thiscall fbxsdk::FbxRedBlackTree<class fbxsdk::FbxMap<class fbxsdk::FbxString,class fbxsdk::FbxObject *,struct fbxsdk::FbxStringCompare,class fbxsdk::FbxBaseAllocator>::KeyValuePair,struct fbxsdk::FbxStringCompare,class fbxsdk::FbxBaseAllocator>::Insert(class fbxsdk::FbxMap<class fbxsdk::FbxString,class fbxsdk::FbxObject *,struct fbxsdk::FbxStringCompare,class fbxsdk::FbxBaseAllocator>::KeyValuePair const &)" (?Insert@?$FbxRedBlackTree@VKeyValuePair@?$FbxMap@VFbxString@fbxsdk@@PAVFbxObject@2@UFbxStringCompare@2@VFbxBaseAllocator@2@@fbxsdk@@UFbxStringCompare@3@VFbxBaseAllocator@3@@fbxsdk@@QAE?AV?$FbxPair@PAVRecordType@?$FbxRedBlackTree@VKeyValuePair@?$FbxMap@VFbxString@fbxsdk@@PAVFbxObject@2@UFbxStringCompare@2@VFbxBaseAllocator@2@@fbxsdk@@UFbxStringCompare@3@VFbxBaseAllocator@3@@fbxsdk@@_N@2@ABVKeyValuePair@?$FbxMap@VFbxString@fbxsdk@@PAVFbxObject@2@UFbxStringCompare@2@VFbxBaseAllocator@2@@2@@Z) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "void * __cdecl fbxsdk::FbxMalloc(unsigned int)" (?FbxMalloc@fbxsdk@@YAPAXI@Z) が関数 "public: void * __thiscall fbxsdk::FbxBaseAllocator::AllocateRecords(unsigned int)" (?AllocateRecords@FbxBaseAllocator@fbxsdk@@QAEPAXI@Z) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "public: int __thiscall fbxsdk::FbxString::Compare(char const *)const " (?Compare@FbxString@fbxsdk@@QBEHPBD@Z) が関数 "public: int __thiscall fbxsdk::FbxStringCompare::operator()(class fbxsdk::FbxString const &,class fbxsdk::FbxString const &)const " (??RFbxStringCompare@fbxsdk@@QBEHABVFbxString@1@0@Z) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall fbxsdk::FbxString::operator char const *(void)const " (??BFbxString@fbxsdk@@QBEPBDXZ) が関数 "public: int __thiscall fbxsdk::FbxStringCompare::operator()(class fbxsdk::FbxString const &,class fbxsdk::FbxString const &)const " (??RFbxStringCompare@fbxsdk@@QBEHABVFbxString@1@0@Z) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "void __cdecl fbxsdk::FbxFree(void *)" (?FbxFree@fbxsdk@@YAXPAX@Z) が関数 "public: void __thiscall fbxsdk::FbxBaseAllocator::FreeMemory(void *)" (?FreeMemory@FbxBaseAllocator@fbxsdk@@QAEXPAX@Z) で参照されました。
1>main.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall fbxsdk::FbxString::FbxString(class fbxsdk::FbxString const &)" (??0FbxString@fbxsdk@@QAE@ABV01@@Z) が関数 "public: __thiscall fbxsdk::FbxPair<class fbxsdk::FbxString const ,class fbxsdk::FbxObject *>::FbxPair<class fbxsdk::FbxString const ,class fbxsdk::FbxObject *>(class fbxsdk::FbxString const &,class fbxsdk::FbxObject * const &)" (??0?$FbxPair@$$CBVFbxString@fbxsdk@@PAVFbxObject@2@@fbxsdk@@QAE@ABVFbxString@1@ABQAVFbxObject@1@@Z) で参照されました。
1>c:\users\taiju\documents\visual studio 2010\Projects\HelloFBX\Debug\HelloFBX.exe : fatal error LNK1120: 外部参照 8 が未解決です。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========