[osg-users] [osgPlugins] building the fbx plugin
Tim Whowantstoknow
Tare.noN at web.de
Wed Oct 10 08:04:46 PDT 2018
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 at FbxAnimStack@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimStack::ClassId" (?ClassId at FbxAnimStack@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRNode.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimStack::ClassId" (?ClassId at FbxAnimStack@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRAnimation.obj : error LNK2001: unresolved external symbol "private: static void (__cdecl* fbxsdk::FbxAnimCurveKey::mDeallocatorFct)(class fbxsdk::FbxAnimCurveKey_Impl *)" (?mDeallocatorFct at FbxAnimCurveKey@fbxsdk@@0P6AXPEAVFbxAnimCurveKey_Impl at 2@@ZEA)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "private: static void (__cdecl* fbxsdk::FbxAnimCurveKey::mDeallocatorFct)(class fbxsdk::FbxAnimCurveKey_Impl *)" (?mDeallocatorFct at FbxAnimCurveKey@fbxsdk@@0P6AXPEAVFbxAnimCurveKey_Impl at 2@@ZEA)
1>fbxRAnimation.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId at FbxAnimLayer@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId at FbxAnimLayer@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRNode.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxAnimLayer::ClassId" (?ClassId at FbxAnimLayer@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRCamera.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxCamera::ClassId" (?ClassId at FbxCamera@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRLight.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxLight::ClassId" (?ClassId at FbxLight@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sEmissive" (?sEmissive at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sEmissive" (?sEmissive at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sAmbient" (?sAmbient at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sAmbient" (?sAmbient at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sDiffuse" (?sDiffuse at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sDiffuse" (?sDiffuse at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sSpecular" (?sSpecular at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sSpecular" (?sSpecular at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sShininess" (?sShininess at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sShininess" (?sShininess at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sNormalMap" (?sNormalMap at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sNormalMap" (?sNormalMap at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sTransparentColor" (?sTransparentColor at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sTransparentColor" (?sTransparentColor at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sReflection" (?sReflection at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static char const * const fbxsdk::FbxSurfaceMaterial::sReflection" (?sReflection at FbxSurfaceMaterial@fbxsdk@@2PEBDEB)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxBlendShape::ClassId" (?ClassId at FbxBlendShape@fbxsdk@@2VFbxClassId at 2@A)
1>fbxRMesh.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxMesh::ClassId" (?ClassId at FbxMesh@fbxsdk@@2VFbxClassId at 2@A)
1>ReaderWriterFBX.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxAxisSystem const fbxsdk::FbxAxisSystem::OpenGL" (?OpenGL at FbxAxisSystem@fbxsdk@@2V12 at B)
1>ReaderWriterFBX.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxGeometry::ClassId" (?ClassId at FbxGeometry@fbxsdk@@2VFbxClassId at 2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxFileTexture::ClassId" (?ClassId at FbxFileTexture@fbxsdk@@2VFbxClassId at 2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxLayeredTexture::ClassId" (?ClassId at FbxLayeredTexture@fbxsdk@@2VFbxClassId at 2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxSurfaceLambert::ClassId" (?ClassId at FbxSurfaceLambert@fbxsdk@@2VFbxClassId at 2@A)
1>fbxMaterialToOsgStateSet.obj : error LNK2001: unresolved external symbol "public: static class fbxsdk::FbxClassId fbxsdk::FbxSurfacePhong::ClassId" (?ClassId at FbxSurfacePhong@fbxsdk@@2VFbxClassId at 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
More information about the osg-users
mailing list