returnString / ManagedFBX

A .NET wrapper for the Autodesk FBX SDK.
Other
43 stars 31 forks source link

Trying to build with VS Express 2013 #2

Open mambo4 opened 10 years ago

mambo4 commented 10 years ago

I'm quite new to C++ projects,and I am trying to build ManagedFBX for use in C#. Using Visual Studio Express 2013 , I am not sure how to "Ensure that the ManagedFbx project is pointing at the correct library and headers for the SDK". any chance you can clarify how to add the correct files to my project?

jethac commented 10 years ago

Have you installed the FBX SDK? There should be a folder inside it with the files you need.

mambo4 commented 10 years ago

I do have the SDK installed. This is more of an issue of Visual Studio ignorance about what files specifically to add to the VS project and how exactly to add them.

I figured out how to add additional include directories via the Project Properties settings. I added C:\Program Files\Autodesk\FBX\FBX SDK\2014.2.1\include C:\Program Files\Autodesk\FBX\FBX SDK\2014.2.1\lib Is that all I need to do?

trying to add reference to libfbxsdk.dll fails with an error:

FBX SDK Visual Studio could not add reference to ..\lifbxsdk.dll "For one of the following Reasons: -Targets a higher version of the .NET framework -Not a .NET assembly -Not a regiwtered Active X control" "

Building without this reference produces errors. Do I need a reference to lifbxsdk.dll as well?

mambo4 commented 10 years ago

These are the build errors I see error C4996: 'fbxsdk_2014_2_1::FbxGeometryConverter::TriangulateMesh': was declared deprecated Mesh.cpp 14 1 ManagedFbx error C2039: 'GetLastErrorString' : is not a member of 'fbxsdk_2014_2_1::FbxImporter' Scene.cpp 18 1 ManagedFbx error C2512: 'System::String::String' : no appropriate default constructor available Scene.cpp 18 1 ManagedFbx error C2039: 'GetLastErrorString' : is not a member of 'fbxsdk_2014_2_1::FbxImporter' Scene.cpp 23 1 ManagedFbx error C2512: 'System::String::String' : no appropriate default constructor available Scene.cpp 23 1 ManagedFbx error C2039: 'GetLastErrorString' : is not a member of 'fbxsdk_2014_2_1::FbxExporter' Scene.cpp 36 1 ManagedFbx error C2512: 'System::String::String' : no appropriate default constructor available Scene.cpp 36 1 ManagedFbx error C2039: 'GetLastErrorString' : is not a member of 'fbxsdk_2014_2_1::FbxExporter' Scene.cpp 39 1 ManagedFbx error C2512: 'System::String::String' : no appropriate default constructor available Scene.cpp 39 1 ManagedFbx error C2039: 'GetEvaluator' : is not a member of 'fbxsdk_2014_2_1::FbxScene' Scene.cpp 126 1 ManagedFbx error C2227: left of '->GetNodeGlobalTransform' must point to class/struct/union/generic type Scene.cpp 126 1 ManagedFbx error C3536: 'total': cannot be used before it is initialized Scene.cpp 131 1 ManagedFbx error C2039: 'MultT' : is not a member of 'System::Int32' Scene.cpp 131 1 ManagedFbx

jethac commented 10 years ago

Yeah, the current branch isn't set up to target FBX SDK 2014.2. May I suggest giving my develop branch a shot? I did some conversion work for that over there a few months back. https://github.com/jethac/ManagedFBX/tree/develop

(It's been ages since I touched the code and I've forgotten a lot about it, otherwise I'd submit it as a formal pull request.)

returnString commented 10 years ago

Hola, been a while since I worked on this, sorry :( Totally open to pull requests though.

mambo4 commented 10 years ago

I appreciate the help. Swamped with other tasks at the moment, but i will try Jethac's branch when i get a moment.

mambo4 commented 10 years ago

took a stab at bulding from jethac / ManagedFBX/ an got less errors... Error 1 error C2039: 'GetAnimationEvaluator' : is not a member of 'fbxsdk_2014_2_1::FbxManager' C:\Users\lbender\Documents\GitHub\ManagedFBX\ManagedFbx\Scene.cpp 128 1 ManagedFbx Error 2 error C2227: left of '->GetNodeGlobalTransform' must point to class/struct/union/generic type C:\Users\lbender\Documents\GitHub\ManagedFBX\ManagedFbx\Scene.cpp 128 1 ManagedFbx Error 3 error C3536: 'total': cannot be used before it is initialized C:\Users\lbender\Documents\GitHub\ManagedFBX\ManagedFbx\Scene.cpp 133 1 ManagedFbx Error 4 error C2039: 'MultT' : is not a member of 'System::Int32' C:\Users\lbender\Documents\GitHub\ManagedFBX\ManagedFbx\Scene.cpp 133 1 ManagedFbx

I still cant add a reference to libfbxsdk.dll to the project. Is this a requirement? Using VS Express 2013 if that helps...

jethac commented 10 years ago

I've updated my branches to properly target 2014.2.1; building successfully over here using VS2012. Pull down my latest version, @mambo4, and see whether that works for you.

mambo4 commented 10 years ago

It builds without errors now, but the ManagedFBX.Samples won't test run correctly out of Visual Studio However the test .exe file runs fine, and works! So is mostly working for VS Express 2013 / FBX SDK 2014.2.1 Cheers to both of you.

mambo4 commented 10 years ago

update: I can build this project using Visual Studio Express 2012 / FBX SDK 2014.2.1

but NOT VS Express 2013 / FBX SDK 2014.2.1

there does seem to be something peculiar about the dll , it appears to not be completely managed, which prevents me from throwing the dll into 3DS Max max script plugins.

ciapoide commented 9 years ago

Hi jetach and mambo4,

@jethac : I am trying to go through the same process, but I am not able to find the FBX SDK 2014.2.1, I can only download the version 2015.1 from the link provided in the Readme.md file. I was wondering whether you would be implementing something for the new SDK version as well, in future?

@mambo4 : did you have to reference to lifbxsdk.dll in the end to make it work? I am receiving the same error msg: ("Targets a higher version of the .NET framework, Not a .NET assembly, Not a registered Active X control")

After I reference the additional folders, this is the error I get: "error LNK1104: cannot open file 'libfbxsdk-md.lib'". I am using VS2013 with FBX SDK 2015.1 (VS2013 (exe - 94654Kb)).

Thanks in advance for your help!