Jump to content
  • Advertisement
Sign in to follow this  
Alessandro Pozzer

How to configure FBX SDK 2017 for Visual Studio properly

This topic is 649 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to implement Fbx sdk in my project but it gives me a lot of unresolved external symbol errors. Reading some info online I found out that this is a problem of configuration but still I dont know what's wrong with that I did. This is the output log:

 

unresolved external symbol "__declspec(dllimport) public: char * __thiscall fbxsdk::FbxString::Buffer(void)" (__imp_?Buffer@FbxString@fbxsdk@@QAEPADXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall fbxsdk::FbxString::~FbxString(void)" (__imp_??1FbxString@fbxsdk@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall fbxsdk::FbxString::FbxString(char const *)" (__imp_??0FbxString@fbxsdk@@QAE@PBD@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: bool __thiscall fbxsdk::FbxProperty::Get(void *,enum fbxsdk::EFbxType const &)const " (__imp_?Get@FbxProperty@fbxsdk@@IBE_NPAXABW4EFbxType@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall fbxsdk::FbxImporter::Import(class fbxsdk::FbxDocument *,bool)" (__imp_?Import@FbxImporter@fbxsdk@@QAE_NPAVFbxDocument@2@_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class fbxsdk::FbxImporter * __cdecl fbxsdk::FbxImporter::Create(class fbxsdk::FbxManager *,char const *)" (__imp_?Create@FbxImporter@fbxsdk@@SAPAV12@PAVFbxManager@2@PBD@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class fbxsdk::FbxNode * __thiscall fbxsdk::FbxScene::GetRootNode(void)const " (__imp_?GetRootNode@FbxScene@fbxsdk@@QBEPAVFbxNode@2@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class fbxsdk::FbxScene * __cdecl fbxsdk::FbxScene::Create(class fbxsdk::FbxManager *,char const *)" (__imp_?Create@FbxScene@fbxsdk@@SAPAV12@PAVFbxManager@2@PBD@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class fbxsdk::FbxManager * __cdecl fbxsdk::FbxManager::Create(void)" (__imp_?Create@FbxManager@fbxsdk@@SAPAV12@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class fbxsdk::FbxIOSettings * __cdecl fbxsdk::FbxIOSettings::Create(class fbxsdk::FbxManager *,char const *)" (__imp_?Create@FbxIOSettings@fbxsdk@@SAPAV12@PAVFbxManager@2@PBD@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall fbxsdk::FbxStatus::GetErrorString(void)const " (__imp_?GetErrorString@FbxStatus@fbxsdk@@QBEPBDXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class fbxsdk::FbxNodeAttribute * __thiscall fbxsdk::FbxNode::GetNodeAttributeByIndex(int)" (__imp_?GetNodeAttributeByIndex@FbxNode@fbxsdk@@QAEPAVFbxNodeAttribute@2@H@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall fbxsdk::FbxNode::GetNodeAttributeCount(void)const " (__imp_?GetNodeAttributeCount@FbxNode@fbxsdk@@QBEHXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class fbxsdk::FbxNode * __thiscall fbxsdk::FbxNode::GetChild(int)" (__imp_?GetChild@FbxNode@fbxsdk@@QAEPAV12@H@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall fbxsdk::FbxNode::GetChildCount(bool)const " (__imp_?GetChildCount@FbxNode@fbxsdk@@QBEH_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall fbxsdk::FbxObject::GetName(void)const " (__imp_?GetName@FbxObject@fbxsdk@@QBEPBDXZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall fbxsdk::FbxObject::Destroy(bool)" (__imp_?Destroy@FbxObject@fbxsdk@@QAEX_N@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall fbxsdk::FbxVectorTemplate3<double>::FbxVectorTemplate3<double>(void)" (__imp_??0?$FbxVectorTemplate3@N@fbxsdk@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall fbxsdk::FbxVectorTemplate3<double>::~FbxVectorTemplate3<double>(void)" (__imp_??1?$FbxVectorTemplate3@N@fbxsdk@@QAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: double & __thiscall fbxsdk::FbxVectorTemplate3<double>::operator[](int)" (__imp_??A?$FbxVectorTemplate3@N@fbxsdk@@QAEAANH@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class fbxsdk::FbxVectorTemplate3<double> & __thiscall fbxsdk::FbxVectorTemplate3<double>::operator=(double const &)" (__imp_??4?$FbxVectorTemplate3@N@fbxsdk@@QAEAAV01@ABN@Z)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class fbxsdk::FbxStatus & __thiscall fbxsdk::FbxIOBase::GetStatus(void)" (__imp_?GetStatus@FbxIOBase@fbxsdk@@QAEAAVFbxStatus@2@XZ)
1>LIBCMT.lib(exe_winmain.obj) : error LNK2001: unresolved external symbol _WinMain@16

 

Here's the code SkinnedMesh.cpp:

 

#include "stdafx.h"

#include "SkinnedMesh.h"

FbxManager* fbxManager = nullptr;

HRESULT SkinnedMesh::LoadFBX(std::vector<MyVertex>* outVertexVector)
{
if (fbxManager == nullptr)
{
fbxManager = FbxManager::Create();
FbxIOSettings* ioSettings = FbxIOSettings::Create(fbxManager, IOSROOT);
fbxManager->SetIOSettings(ioSettings);
}

FbxImporter* importer = FbxImporter::Create(fbxManager, "");
FbxScene* fbxScene = FbxScene::Create(fbxManager, "");

bool success = importer->Initialize("walk.fbx", -1, fbxManager->GetIOSettings());
if (!success)
{
return E_FAIL;
}

importer->Destroy();
FbxNode* rootNode = fbxScene->GetRootNode();

if (rootNode)
{
for (int i = 0; i < rootNode->GetChildCount(); i++)
{
FbxNode* fbxChildNode = rootNode->GetChild(i);
if (fbxChildNode->GetNodeAttribute() == NULL)
{
continue;
}

FbxMesh* pMesh = (FbxMesh*)fbxChildNode->GetNodeAttribute();
FbxVector4* pVertices = pMesh->GetControlPoints();
for (int j = 0; j < pMesh->GetPolygonCount(); j++)
{
int numVertices = pMesh->GetPolygonSize(j);
assert(numVertices == 3);

for (int k = 0; k < numVertices; k++)
{
int controlPointIndex = pMesh->GetPolygonVertex(j, k);
MyVertex vertex;
vertex.pos[0] = (float)pVertices[controlPointIndex].mData[0];
vertex.pos[1] = (float)pVertices[controlPointIndex].mData[1];
vertex.pos[2] = (float)pVertices[controlPointIndex].mData[2];
outVertexVector->push_back(vertex);
}
}
}

}

return S_OK;
}

 

Do you have any idea about what is happening?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!