THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/01/2003 at 02:32, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Language(s) : C.O.F.F.E.E ;
I'm hoping that there's a solution to this, but I'm not optimistic...
I've been trying to build the SDK plugins for Windows using CodeWarrior 8.3 under Windows. I can get them to build cleanly, but they cause C4D to crash instantly on startup.
I note that the R8 documentation says:
PC only: the compiler options for Pointer-to-member representation MUST be set to "General-Purpose Always" and "Point to Single-Inheritance Classes" (C++ tab/C++ language) (/vmg /vms). If not set the plugin WILL crash instantly!
I'm guessing that this is my problem. I asked about this on the 'codewarrior.windows' newsgroup and got the following reply from someone at Metrowerks (who make Codewarrior) :
Unfortunately it seems you're out of luck. The Codewarrior PTM representation is a 12-byte structure and there's no switch to coerce it into a pointer. If your class only uses single inheritance, then it should be possible to extract the actual function pointer by using a hack, based on the cpprtl.c runtime code, but it would require a lot of source changes (read: hacks) and I'm not sure how easily you could integrate this into the Cinema4D SDK._
I've managed to build a test plugin under the R7 API, which runs fine under both R7 and R8 versions of C4D, so it seems that this requirement is new to the R8 API.
I'd like to be able to use CW to build for both Mac and Win under R8, but it seems that this is not possible (though it was with R7), and that I either have to use VC6 as well as CW, or I have to stick to the R7 API. I'd rather not use VC6 unless I have to, for various reasons.
Any comments on this?