Link errors in R10 but not R9 (Xcode)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/04/2010 at 17:41, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10 
    Platform:      Mac OSX  ; 
    Language(s) :

    ---------
    Howdy,

    Using Xcode 2.5, I'm trying to compile a plugin using an external library, which compiled fine in R9.5 and R9.6, but I'm getting link errors when compiling it in R10. The errors are pointing to these undefined symbols:

    _SCDynamicStoreCopyProxies
    _libiconv
    _libiconv_close
    _libiconv_open

    Is there a reason why those errors aren't in R9 but are in R10. I did a search for "SCDynamicStoreCopyProxies" on my HD and found it in one of the headers from the SystemConfiguration framework. If I add that framework to the project, then that one error goes away.

    But, for the other three errors, libiconv, _libiconv_close and libiconv_open, I can't find anything on them through searching my HD, so I don't know what framework or library they're in to include.

    Both the R9 and R10 compiles are using Xcode 2.5.

    Any clues?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/04/2010 at 18:33, xxxxxxxx wrote:

    Screw what I wrote before, I just realised that you are getting the errors with the external libs only. Man, it´s too late...sorry, cannot help I´m afraid. Maybe it would help others to know the libs if that´s possible for you to disclose.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/04/2010 at 19:47, xxxxxxxx wrote:

    Howdy,

    Yeah, the link errors are certainly coming from the external library.

    I googled "libiconv" and apparently it's a library that can be downloaded and installed for Mac OS X from here:
    http://libiconv.darwinports.com/

    But the question is, why are the errors not coming up using the R9.5-9.6 api and that libiconv library never shows up when I search my HD? Is it precompiled into the R9 api and not the R10 api, or something? Is it an R10 api project setting that's different?

    I'm a bit hesitant to download and install something that might screw everything up.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 02/04/2010 at 04:47, xxxxxxxx wrote:

    yeah, that is indeed strange. Make sure there is no -liconv or similar set in the build settings. Are you able to use a later XCode version maybe? Did you update your OS recently?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 02/04/2010 at 07:01, xxxxxxxx wrote:

    Howdy,

    Well, on the machine I'm using, I have Snow Leopard installed. It comes with Xcode 3.2, but R10 doesn't seem to compile in 3.2, without api errors. So, I also installed Xcode 2.5, in its own folder in the root directory of the HD, as suggested by Apple. Xcode 2.5 will compile the R10 api.

    I have another machine that is running Leopard with R11 demo on it. That one has Xcode 3.0 installed, but I haven't tried compiling the external library over there yet.

    The libiconv library seems to deal with unicode characters and converting them. I can't imagine why that wouldn't be found by searching my HD. Seems like that would be a "must have" for Mac OS? Unless it is part of another existing framework or library?

    After more searching I found these lines in one of the header files from the external library
    #ifdef LIBXML_ICONV_ENABLED
    #include <iconv.h>
    #endif

    ... and these lines in another header file from the external library:
    /**
    * LIBXML_ICONV_ENABLED:
    *
    * Whether iconv support is available
    */
    #if 0
    #define LIBXML_ICONV_ENABLED
    #endif

    So, it appears that the external library checks for iconv support, and if it's available it tries to include iconv.h (which is nowhere to be found on my HD)

    So is it possible that the R9.5-9.6 api doesn't have iconv support, but the R10 api does, and that would be why the external library compiles fine with an R9.5-9.6 api plugin? Or, is there some Mac OS X framework or library that the R9.5-9.6 api has included in it, that the R10 api doesn't, that I would need to include in my plugin project?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 02/04/2010 at 10:55, xxxxxxxx wrote:

    Hi,

    can´t comment on the lib as I am really not that familiar with the MAC platform but I have the latest XCode installed and it compiles the R10 api without errors for me, so that seems strange in the first place.

    But I would assume that the libiconv lib comes with the default MAC SDK. But that´s really only guessing. In any case I would simply try to install the lib with a copy of your project to see if that chnges anything. Hard to tell.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 02/04/2010 at 20:11, xxxxxxxx wrote:

    Howdy,

    Well, it looks like the find function in Mac OS is not finding things properly or something, because I found the files manually that it could not find.

    The libiconv library is here:

    ... and the iconv.h file is here:

    But the libiconv library is a .dylib (dynamic library). How can that be used in the plugin project? And since it is a part of the MacOSX10.4u.sdk, why isn't the project linking to it properly? Maybe it is some kind of build setting or something?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 03:25, xxxxxxxx wrote:

    Hi,

    yap, could be a build setting. That´s why I said earlier you should look out for a -liconv somewhere or a similar flag. It seems the lib is still in its standard folder so that couldn´t raise the build error.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 11:24, xxxxxxxx wrote:

    Howdy,

    Hmmmm, I just tried this: I copied my R9.5-9.6 plugin project over to the R10 folder, right clicked on the api project in my plugin project and selected Touch so it would update to the R10 api, and it gets the same errors. So it must be a build setting in the api project that is causing it.

    Is it safe to alter any api build settings?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 14:08, xxxxxxxx wrote:

    Does the R10 c4d sdk compile fine for you? I would definetly try! I don´t think you require to alter the api built settings.

    If it does compile fine I´d rather copy your project over and use the c4d sdk xcode project file and load in all your stuff in there.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 15:11, xxxxxxxx wrote:

    Just a side note when you're compiling under OS X 10.6: to compile at least the R11.x SDK you need to choose OS X 10.5 in the build settings as the basic framework. Might be related to your issue...

    Kabe



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 17:29, xxxxxxxx wrote:

    Howdy,

    Originally posted by xxxxxxxx

    ...Does the R10 c4d sdk compile fine for you?...

    Yes, the R10 sdk project compiles fine, and so do all my other plugins. To create a plugin project I always start from a copy of the sdk project and change the names, settings and source files according to Maxon's guidelines in the xcodemigration.pdf file.

    First, I set the plugin project up in R9.5, starting from the R9.5 sdk project, added the external library files, compiled it and there were link errors. After adding the Core Foundation and Core Services frameworks to the project, it compiled fine.

    So, then I tried it in R10 doing the same steps as I did with R9.5, starting from a copy of the R10 sdk project, adding the external library files and adding the 2 additional Core frameworks to the project. But, then I got those link errors.

    Then I tried the same thing in R9.6, and everything was fine just like in R9.5.

    The latest thing I tried was to start from a copy of my plugin project that worked in R9.5 and just updated (Touched) the api project that's in the plugin project, and the same errors appear as starting from a copy of the R10 sdk project.

    So the plugin project settings in this last attempt are the same as the R9.5 settings (which worked) but the api project was updated to R10. The conclusion seems like it would be a build setting in the R10 api project that must be different than the R9.5 api project. I'll have to go through and compare them 1 by 1 and see what the differences are.

    Originally posted by xxxxxxxx

    Just a side note when you're compiling under OS X 10.6: to compile at least the R11.x SDK you need to choose OS X 10.5 in the build settings as the basic framework. Might be related to your issue...

    Right, but that's for Xcode3.0. When compiling for R10 using Xcode2.5, the only Mac SDK available is 10.4, which works fine for the R10 sdk project and every other R10 plugin I've compiled. And the Mac 10.4 SDK also worked fine compiling the plugin in R9.5.

    The next thing I'm going to try is setting up the plugin project in R11 with Xcode3.0 and see if those same link errors appear.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2010 at 17:39, xxxxxxxx wrote:

    Ah ok, I see. However, it is strange that the additions of yours affect the api built. The api is build before your project and the api is not dependent on the project. So adding the libs shouldn´t affect the api build though withuot the knowing the libs it´s hard to tell.

    Another assumption could be a problem similar to the windows problem where windows header files must be included before c4d includes (or was it the other way round). Could this be the case also for you? Including files from the library after the c4d includes (or the other way round)? However this would deal with the project build actually not the api build, so...hmm.

    Comparing the flags set in the build settings is surely worth a try in any case.

    Curious to see where this goes.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2010 at 06:51, xxxxxxxx wrote:

    Howdy,

    Well, this has really got me stumped.

    I stored a copy of the R10 api project for safe keeping, so I can make changes to the build settings to match the R9.5 api build settings and that didn't work. The api compiled fine but the plugin project still has those link errors.

    Then I also tried setting up the plugin project on another machine running the R11 demo and using Xcode3.0 and the same link errors appear.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2010 at 07:17, xxxxxxxx wrote:

    Howdy,

    Also,I just tried creating a standard C++ application project, added the external library and the same function calls to the external library I was using in my plugin, and everything compiled fine there.

    So, the problem seems to be c4d api R10+ related.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/04/2010 at 08:56, xxxxxxxx wrote:

    Howdy,

    Well, I tried every framework in the list, and non of them seem to solve the link errors when added to the project.

    The external library I'm trying to use is the Autodesk FBX SDK 2010.2 library. I need to add fbx import/export support for my plugins, because the c4d fbx import/export doesn't recognize my plugin's joint object and skin tag.

    Maybe Maxon's developers have encountered this same problem with the built in fbx import/export, since it also seems to be a dylib (plugin)?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/04/2010 at 09:11, xxxxxxxx wrote:

    I will be in the office tommorrow again and will try if I also get errors on my MAC with the R10 sdk and the fbx lib linked. I´ll let you know.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 08/04/2010 at 09:57, xxxxxxxx wrote:

    Howdy,

    Any word on this issue? Matthias?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 08/04/2010 at 15:28, xxxxxxxx wrote:

    Howdy,

    OK, it seems I've made some progress.

    There seems to be an issue with libiconv library between 64/32 bit. I'm able to compile in R10 but only for intel 32 bit (i386), and only on my 32bit core duo machine running Leopard.
    if I open the terminal on that machine and type in:

    file /opt/local/lib/libiconv.dylib
    

    ... it displays this:

    /opt/local/lib/libiconv.dylib: Mach-O dynamically linked shared library i386
    

    On my core 2 quad machine running Snow Leopard, the libiconv library is 64 bit only.
    On this machine typing in the above line in the terminal displays this:

    /opt/local/lib/libiconv.dylib: Mach-O 64-bit dynamically linked shared library x86_64
    

    When I use that same terminal command with the path to the FBX SDK library file, it displays this:

    /Xcode2.5/FBXSDK20102/lib/libfbxsdk_gcc4_ub.a: Mach-O universal binary with 4 architectures   
    /Xcode2.5/FBXSDK20102/lib/libfbxsdk_gcc4_ub.a (for architecture ppc) : current ar archive   
    /Xcode2.5/FBXSDK20102/lib/libfbxsdk_gcc4_ub.a (for architecture i386) : current ar archive   
    /Xcode2.5/FBXSDK20102/lib/libfbxsdk_gcc4_ub.a (for architecture ppc64) : current ar archive   
    /Xcode2.5/FBXSDK20102/lib/libfbxsdk_gcc4_ub.a (for architecture x86_64) : current ar archive
    

    So the conclusion may be that the FBX SDK supports all architectures but the libiconv library only supports specific machines.

    I'm not sure if there is a universal binary version of libiconv available.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 09/04/2010 at 07:16, xxxxxxxx wrote:

    FYI I can confirm the issue and have contacted the developers.

    I can build plugins linked against the FBX library for Cinema R10 without problems.

    With Cinema R11 64bit I got some undefined symbols.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 09/04/2010 at 07:53, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    [...]
    So the conclusion may be that the FBX SDK supports all architectures but the libiconv library only supports specific machines.

    I'm not sure if there is a universal binary version of libiconv available.

    Adios,
    Cactus Dan

    The readme.txt of the PC version of the FBX SDK explicitly states, that they don't support ppc64. If memory serves me right we once tried to get around those problems (by faking some lib entry points) after discovering, that the SDK contained ppc64 bit code - but finally failed due to a missing method (inside of the FBX SDK).

    Best regards,

    Wilfried Behne


Log in to reply