Compiling the SDK example on a Mac



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

    On 15/09/2009 at 05:58, xxxxxxxx wrote:

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

    ---------
    I'm having exactly the same problem as in this thread here.

    When I try to build the SDK example, it first tries to compile the API, compiling 120 files and racking up 9000+ errors. Then it compiles the 52 files of the example, with more errors giving a total of over 10,000. Most, if not all, of these appear to relate to the standard C++ header files, presumably from the MacOSX SDK. I've checked those files and they do exist, but it seems as if Xcode is not looking in the right place for them, yet I can't find anywhere in the Xcode configuration to check that.

    This is a new Macbook Pro, OSX 10.5.7, with C4D installed and updated, then Xcode 3.1 freshly downloaded from Apple and installed in the default location. I've copied the plugins and resource folders from the C4D installation into a subfolder of my Documents folder, so permissions shouldn't be a problem. I've also specified a new location for the build files, also within Documents.

    I've also tried modifying the various architectures, SDKs used, and OSX version compatibility, as in the linked thread, but nothing works. As a pretty much brand-new Mac user, I'm not sure what to do next. I'd really appreciate any help in getting this working.



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

    On 16/09/2009 at 04:15, xxxxxxxx wrote:

    Okay, I reinstalled version 3.1.4 of Xcode and it compiled first time! The problem now is that the plugin won't load into C4D. I copied the .dylib file from the build location into the C4D plugins/cinema4dsdk folder, but nothing shows up in the plugin menu and I can't even get it to write to the console.

    What am I doing wrong? Is copying over the plugin file by itself enough or do I need to add something else?



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

    On 16/09/2009 at 06:07, xxxxxxxx wrote:

    Sorry for yet another post on this but I can at last get the SDK example compiled and it will run in C4D. The reason it didn't run before now was that for some reason C4D itself was set to run in 32 bit mode (this must have been done automatically on installation). Setting it to run in 64 bit mode makes the plugin work fine.

    Now, my question is this. C4D is running natively on this version of OSX in 64 bit. Why won't the plugin run if C4D is changed to run in 32 bit mode? I thought these universal binaries were designed to run on 32 bit or 64 bit? Or would it only run in 32 bit mode if the OS was 32 bit? This is my lack of Mac experience showing here! But it's an important question when it comes to plugin distribution, so I'd be interested in any comments.



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

    On 16/09/2009 at 06:12, xxxxxxxx wrote:

    You probably did compile the debug version of the plugin. In R11 the debug version is 64bit only by default. The release version should be 32 and 64bit.

    It is possible to compile 32bit debug versions as well but I have to check again how to do it.

    cheers,
    Matthias



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

    On 16/09/2009 at 06:53, xxxxxxxx wrote:

    Quote: Originally posted by spedler on 16 September 2009
    >
    > * * *
    >
    > Sorry for yet another post on this but I can at last get the SDK example compiled and it will run in C4D. The reason it didn't run before now was that for some reason C4D itself was set to run in 32 bit mode (this must have been done automatically on installation). Setting it to run in 64 bit mode makes the plugin work fine.
    >
    > Now, my question is this. C4D is running natively on this version of OSX in 64 bit. Why won't the plugin run if C4D is changed to run in 32 bit mode? I thought these universal binaries were designed to run on 32 bit or 64 bit? Or would it only run in 32 bit mode if the OS was 32 bit? This is my lack of Mac experience showing here! But it's an important question when it comes to plugin distribution, so I'd be interested in any comments.
    >
    >
    >
    >
    > * * *

    r11 defaulted to 32 bit, to avoid compatiblity problems (as plugin developers needed time to re-compile or adapt their code for 64 bit on the Mac).

    With r11.5 this was changed. It starts in 64 bit as default.

    For debugging the projects only create one mode, as this this decrease the build times dramatically - but you're free to change that in the project files, if you like to.

    The release builds are always created as universal binary (32 bit intel & ppc, 64 bit intel & ppc).

    Best regards,

    Wilfried Behne



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

    On 16/09/2009 at 08:27, xxxxxxxx wrote:

    Dear Matthias & Wilfried,

    Thank you both very much for your replies. That clears it all up completely.

    Yes, I did compile the debug version - haven't tried the release yet. I don't need to compile the debug32 version, as long as I know what's happening and why it happens, I can live with the 64 bit version for debugging :-)

    I installed R11.5 today and that does indeed start in 64 bit mode.

    All is now explained (until my next problem!).

    Thanks again.


Log in to reply