THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/03/2006 at 13:09, xxxxxxxx wrote:
From the C++ perspective, having done versions for every possibility out there:
If you are using the C++ SDK, the first thing you need to determine is the minimum version that you want (or can) support. Note that the Windows 64-bit version of Cinema 4D can only be compiled for R9.1 or later and that the MacOSX Universal Binary verson of Cinema 4D can only be compiled for R9.5.2 or later. So, if your base plugin support is R8.0, for instance, you will need to be cognizant of the differences in the APIs (as well as system and compiler/linker differences) for porting purposes.
As an example, in R9.0, the Polygon class had a name change to CPolygon which brings endless misery if one is not prepared for it. A simple workaround is to create a define in some strategic header like so:
#ifndef C4D_R9
typedef Polygon CPolygon;
#endif
This redefines Polygon in pre-9.0 compiles so that the same name (CPolygon) can be used in all cases.
There is definitely no way to compile once and have a plugin run on all systems. The minimum setup for supporting all systems is this:
Windows: Visual C++ 6.0 or later (.cdl)
Windows x64: Visual Studio 2005. net or later (.cdl64)
MacOS: CodeWarrior 8.0 or later w/MacOS Classic Target (.xdl)
MacOSX UB: XCode 2.2.1 or later (.dylib).
Luckily, you can get VS2005 and XCode for free, but not the systems on which they run of course (for testing at the least).
As you see, each results in a different binary library which, unlike say Java, is not portable. Only the source code can be made portable.
Finally, remember that although COFFEE is a viable alternative, it does not have the feature set and flexibility of C++ plugins. If your plugins are relatively simple, COFFEE may be your 'cup of tea'. ;) Otherwise, skip the cup o' joe and get down to taking your shots. (drum roll please)....
HTH,