Hi,
I have tried to build the OSG FBX plugin with the FBX SDK 2019 for Visual Studio 2015. I use VS 2017, however there was no such package from Autodesk.
In CMake I set the paths to the include directory. the FBX_LIBRARY to release/libfbxsdk.lib and the FBX_LIBRARY_DEBUG to debug/libfbxsdk.lib
I have not chosen the FBX_SHARED option, since I don't know, what it does.
CMake generated without a problem, but building the pluing in Visual Studio leads to a bunch of unresolved symbols.
Code:
1>------ Build started: Project: Plugins fbx, Configuration: Debug x64 ------
1>fbxRAnimation.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimStack::ClassId" (?ClassId@FbxAnimStack@fbxsdk@@2VFbxClassId@2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimStack::ClassId" (?ClassId@FbxAnimStack@fbxsdk@@2VFbxClassId@2@A)
1>fbxRNode.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimStack::ClassId" (?ClassId@FbxAnimStack@fbxsdk@@2VFbxClassId@2@A)
1>fbxRAnimation.obj : error LNK2001: unresolved external symbol "private: static void (__cdecl* fbxsdk::FbxAnimCurveKey::mDeallocatorFct)(class fbxsdk::FbxAnimCurveKey_Impl *)" (?mDeallocatorFct@FbxAnimCurveKey@fbxsdk@@0P6AXPEAVFbxAnimCurveKey_Impl@2@@ZEA)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "private: static void (__cdecl* fbxsdk::FbxAnimCurveKey::mDeallocatorFct)(class fbxsdk::FbxAnimCurveKey_Impl *)" (?mDeallocatorFct@FbxAnimCurveKey@fbxsdk@@0P6AXPEAVFbxAnimCurveKey_Impl@2@@ZEA)
1>fbxRAnimation.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId@FbxAnimLayer@fbxsdk@@2VFbxClassId@2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId@FbxAnimLayer@fbxsdk@@2VFbxClassId@2@A)
1>fbxRNode.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId@FbxAnimLayer@fbxsdk@@2VFbxClassId@2@A)
1>fbxRCamera.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxCamera::ClassId" (?ClassId@FbxCamera@fbxsdk@@2VFbxClassId@2@A)
1>fbxRLight.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxLight::ClassId" (?ClassId@FbxLight@fbxsdk@@2VFbxClassId@2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sEmissive" (?sEmissive@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sEmissive" (?sEmissive@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sAmbient" (?sAmbient@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sAmbient" (?sAmbient@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sDiffuse" (?sDiffuse@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sDiffuse" (?sDiffuse@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sSpecular" (?sSpecular@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sSpecular" (?sSpecular@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sShininess" (?sShininess@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sShininess" (?sShininess@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sNormalMap" (?sNormalMap@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sNormalMap" (?sNormalMap@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sTransparentColor" (?sTransparentColor@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sTransparentColor" (?sTransparentColor@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sReflection" (?sReflection@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sReflection" (?sReflection@FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxBlendShape::ClassId" (?ClassId@FbxBlendShape@fbxsdk@@2VFbxClassId@2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxMesh::ClassId" (?ClassId@FbxMesh@fbxsdk@@2VFbxClassId@2@A)
1>ReaderWriterFBX.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxAxisSystem const fbxsdk::FbxAxisSystem::OpenGL" (?OpenGL@FbxAxisSystem@fbxsdk@@2V12@B)
1>ReaderWriterFBX.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxGeometry::ClassId" (?ClassId@FbxGeometry@fbxsdk@@2VFbxClassId@2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxFileTexture::ClassId" (?ClassId@FbxFileTexture@fbxsdk@@2VFbxClassId@2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxLayeredTexture::ClassId" (?ClassId@FbxLayeredTexture@fbxsdk@@2VFbxClassId@2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxSurfaceLambert::ClassId" (?ClassId@FbxSurfaceLambert@fbxsdk@@2VFbxClassId@2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxSurfacePhong::ClassId" (?ClassId@FbxSurfacePhong@fbxsdk@@2VFbxClassId@2@A)
1>D:\OpenSceneGraph-3.6.0\bin\osgPlugins-3.7.0\osgdb_fbxd.dll : fatal error LNK1120: 21 unresolved externals
1>Done building project "osgdb_fbx.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 9 up-to-date, 0 skipped ==========
I don't really know what the problem may be. I have looked into the Linker options and the .lib file for FBX was correctly added.
Is this simply an incomaptibility with VS2017? Do I need to set other options?
Kind Regards,
Tim
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75064#75064
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org