NickHardeman/ofxFBX

problem compiling in OSX because of "to ofFile tfile = (srtring)aPathToTexture"

Closed this issue · 5 comments

Hi!
Something's preventing me from using the addon, and XCode fails to compile the example scene because of an error occuring at line 264 of ofxFBXScene.cpp:
ofFile tfile = (string)aPathToTexture;
I get the error:
No viable conversion from 'string' (aka 'basic_string<char, char_traits<char>, allocator<char>>') to 'ofFile'
Does anyone else stumble on that error/has an idea for a solution?
Thanks!

I don't think that the string to ofFile conversion is available in OF anymore.
Try ofFile tfile(aPathToTexture);

Great, it's now fixed but something else now happens with ofxFBXBone.cpp at line 139:
fbxTransform = toFbx( getGlobalTransformMatrix() * ofMatrix4x4::getInverseOf( getParent()->getGlobalTransformMatrix() ) );

i get the error message:
Invalid operands to binary expression ('glm::mat4 (aka 'tmat4x4<float,highp>') and ofMatrix 4x4')

Are you using the OF master branch in git? There was just a switch to support glm instead of ofVec3f. I would recommend using a release of OF from the website if you are working on a project, as the master branch of OF can be unstable and change often.
If define OF_USE_LEGACY_MESH in ofConstants does it stop the breakage?
This addon currently supports OF <= 0.9.3

I was using the OF master branch...
I've now restarted using OF 0.9.3 in xcode 7.2.
When I try to compile, the previous errors are now gone but I get the the error
"Invalild suffix on litteral; C++11 requires a space between literal and identifier" at several lines of code contained in fbxsdk_version.h and fbxexporter.h. As example:
#define FBXSDK_VERSION_STRING_FULL FBXSDK_VERSION_STRING" "FBXSDK_VERSION_NAME" ("FBXSDK_STRINGIFY(FBXSDK_VERSION_REVISION)")"
I went in the build settings to change the compiler mode to C++14 without any luck...

Currently working on OSX and now supports OF 0.10.0 and glm.