Advertisement Jump to content
Sign in to follow this  

Templates in VS2012 ?

This topic is 1656 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

Hi guys,


I've never used STL or templates in my C++ programs so excuse my ignorance. I'm using an SDK (the Autodesk FBX SDK) and it has a function with a template (if that's the right terminology.)


When I use it:


int count=pScene->GetSrcObjectCount<FbxAnimStack>(); compiles just fine but I get this error when it links:


error LNK2001: unresolved external symbol "public: static class fbxsdk_2015_1::FbxClassId fbxsdk_2015_1::FbxAnimStack::ClassId" (?ClassId@FbxAnimStack@fbxsdk_2015_1@@2VFbxClassId@2@A)


Do I have to set up anything in my project to use templates ?


Thanks a lot.


Share this post

Link to post
Share on other sites
I don’t have my code with me but that is not the way to get properties anymore since 2015.1.
Look at the samples. Since I don’t have anything with me, I can only give a generalized answer, but there should be a specialized method to get the animation stack, such as GetAnimationStack().

L. Spiro

Share this post

Link to post
Share on other sites

Templates are a feature of the C++ language, so you don't have to to anything to set them up... debugging the error messages can be confusing though smile.png


I don't know much/anything about Autodesk's SDK, but have you made sure that you are linking your project to their static library (.lib) files?


L. Spiro is spot on with the interface changes... to get the count for a particular object type you should use :

FbxScene::GetMemberCount( const FbxCriteria &pCriteria ) const

So you fill in an FbxCriteria instance with the type of object that you're looking for... in your case FbxAnimStack:

FbxCritera searchCriteria = FbxCriteria::ObjectType( FbxAnimStack::FbxClassId )

Here's a link to the documentation, the GetMemberCount is part of the FbxCollection class, which FbxScene is derived from :


Hope that helps!

Edited by Orangeatang

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!