OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

building the fbx plugin


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins]
View previous topic :: View next topic  
Author Message
Tare
Newbie


Joined: 04 Apr 2018
Posts: 14

PostPosted: Wed Oct 10, 2018 3:04 pm    Post subject:
building the fbx plugin
Reply with quote

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
Back to top
View user's profile Send private message
Tare
Newbie


Joined: 04 Apr 2018
Posts: 14

PostPosted: Thu Oct 11, 2018 7:46 am    Post subject:
Reply with quote

Quote:

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.


Turns out, there is a FBX SDK 2019.2 Beta for VS 2017 which you can get, if you have an account with Autodesk. However, I still get a lot of the same errors, so I'd still appreciate any help.

EDIT:
I have now tried build everything with VS2015 and I still get the linker errors.
Back to top
View user's profile Send private message
Tare
Newbie


Joined: 04 Apr 2018
Posts: 14

PostPosted: Thu Oct 11, 2018 1:13 pm    Post subject:
Reply with quote

I finally figured out my problem. The FBX Solution needs the libfbxsdk, libxml2 and zlib .lib files
1. I was told to use the -md versions of the files
2. In VS in the Linker->Input->Additional Dependencies one of these was missing, i.e. cmake didn't fully configure this.

I first changed to the -md versions in cmake and afterwards added the missing .lib file, so I don't know if the first step really was necessary. With the two combined steps however it worked for FBX SDK 2019.2 for VS2017 and OSG 3.6.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Plugins [osgPlugins] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Building on macOS 10.14 Ulrich Hertlein General 1 Sun Nov 11, 2018 12:45 pm View latest post
No new posts Could not find plugin to load objects sdef General [3rdparty] 1 Sat Oct 27, 2018 6:10 am View latest post
No new posts osg3.6.3 plugin issues jaisingla Plugins [osgPlugins] 2 Thu Oct 18, 2018 6:35 am View latest post
No new posts TIFF plugin reader does not handle im... Eric Sokolowsky Submission 0 Sat Sep 29, 2018 2:30 am View latest post
No new posts Missing OpenThreads PDB when building... guyv Build system [build] 0 Thu Jul 12, 2018 12:39 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP