R16, Xcode 5 and FBX SDK 2012.2

On 27/05/2015 at 14:32, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R16 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
Howdy,

I'm having some link errors trying to compile my CD FBX plugin for R16 with Xcode 5 and the FBX SDK 2012.2.

There are 61 errors, all "Undefined Symbols".
Here is a small sample:

Undefined symbols for architecture x86_64:
  "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_empty_rep_storage", referenced from:
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IStringImpl::IStringImpl() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IStringImpl::IStringImpl() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::substr(unsigned int, unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IStringImpl::~IStringImpl() in libfbxsdk-2012.2-static.a(awString.o)
      ...
  "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_M_destroy(std::allocator<wchar_t> const&)", referenced from:
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::~IString() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::substr(unsigned int, unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IStringImpl::~IStringImpl() in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IStringImpl::~IStringImpl() in libfbxsdk-2012.2-static.a(awString.o)
  "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_leak_hard()", referenced from:
      fbxsdk_2012_2::awString::IString::rfind(bool (* )(wchar_t), unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::operator[](unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::find(bool (* )(wchar_t), unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::operator[](unsigned int) in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::at(unsigned int) in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::at(unsigned int) const in libfbxsdk-2012.2-static.a(awString.o)
      fbxsdk_2012_2::awString::IString::isAscii() const in libfbxsdk-2012.2-static.a(awString.o)
      ...

What libraries am I missing?

And what's the deal with Xcode 5 on Mavericks? It has no MacOSX10.9.sdk folder with includes for standard libraries?

Adios,
Cactus Dan

On 28/05/2015 at 00:07, xxxxxxxx wrote:

Originally posted by xxxxxxxx

<ADDRESS>
User Information:
Cinema 4D Version:   R16 
Platform:     
Mac OSX  ; 
Language(s) :    
C++  ;

---------
</ADDRESS> Howdy,
I'm having some link errors trying to compile my CD FBX plugin for R16 with Xcode 5 and the FBX SDK 2012.2.
There are 61 errors, all "Undefined Symbols".
Here is a small sample:
[...]

And what's the deal with Xcode 5 on Mavericks? It has no MacOSX10.9.sdk folder with includes for standard libraries?
Adios,
Cactus Dan

I've no idea what 's causing your FBX problems (are you using 10.7 oder older as base sdk?), but having no MacOSX10.9.sdk folder is pretty strange. On my Xcode (5.02) installation the 10.9 sdk folder can be found inside of the Xcode package. Open it via Finder and you should find it in:

Xcode/Contents/Developer/Platform/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk

(there's a 10.8 sdk in the same SDKs folder of course). If that doesn't exist or isn't found when using the standard includes, then probably your Xcode installation is broken.

Best regards,

Wilfried

On 28/05/2015 at 05:42, xxxxxxxx wrote:

Howdy,

AHA! I installed Xcode 5.0 and it seems to only have the MacOSX10.8.sdk in there. 

I reckon I better upgrade it.

So, just out of curiosity, why did they hide all that stuff in the package contents instead of having it openly available in the "Developer" folder in the root directory?

Adios,
Cactus Dan

On 28/05/2015 at 06:42, xxxxxxxx wrote:

Originally posted by xxxxxxxx

Howdy,
AHA! I installed Xcode 5.0 and it seems to only have the MacOSX10.8.sdk in there. 
I reckon I better upgrade it.
So, just out of curiosity, why did they hide all that stuff in the package contents instead of having it openly available in the "Developer" folder in the root directory?
Adios,
Cactus Dan

I guess the ones who know wouldn't talk about it in public :-)

Best regards,

Wilfried

On 29/05/2015 at 06:08, xxxxxxxx wrote:

Howdy,

Well, I upgraded to Xcode 5.02, which now includes the MacOSX10.9.sdk, but I'm still getting the same errors. Unhappy

If I change the C++ compiler to GCC those errors disappear in the FBX SDK, but then I get a couple of errors in the Cinema 4D API files.

Should I upgrade the FBX SDK to a more recent version (one that is compatible with clang)?

Adios,
Cactus Dan

On 30/05/2015 at 00:27, xxxxxxxx wrote:

Originally posted by xxxxxxxx

<div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: none; ">Howdy,
Well, I upgraded to Xcode 5.02, which now includes the MacOSX10.9.sdk, but I'm still getting the same errors. Unhappy
If I change the C++ compiler to GCC those errors disappear in the FBX SDK, but then I get a couple of errors in the Cinema 4D API files.
Should I upgrade the FBX SDK to a more recent version (one that is compatible with clang)?
Adios,
Cactus Dan

That 's indeed an idea. Newer FBX sdks have switched to clang (e.g. FBX SDK 2014.2). What you could check though is switching to an older C++ std lib (instead of the default libc++) in the Xcode C++ language settings.

Note that older c++ stdlibs don't allow the full C++11 support - depending on what you're doing might run into different troubles then - switching to a new FBX sdk might in the end be the better solution.

Best regards,

Wilfried