PDA

View Full Version : OT: What programming IDE is used at MAXON for Cinema 4D?


PixelStuff
10-08-2006, 01:16 AM
I was just wondering how Cinema 4D R10 was programmed and compiled for Windows and Mac. What brand, version, etc. Just curious.

Also, do any of you plug-in writers know of a good open source cross platform IDE that is good to start out programming for Windows and OS X compiling. Especialy the Win x64.

Per-Anders
10-08-2006, 01:27 AM
Visual C++ is the recommended IDE for working on Windows, I'm not sure if you'd have much luck getting the SDK to load and compile with anything else in XP, you can download Visual C++ Express for free from MSDN : http://msdn.microsoft.com/vstudio/express/visualc/download/ and get going with it right away (don't forget to download the platform SDK though too, linked at the bottom of that download link).

The SDK project that comes with Cinema (even the demo) will load right up into that and should compile with one click, then just explore for yourself, it has a heap of example plugins for you to pull apart, change and whatnot, most plugins start out from a copy of the SDK folder as it's so easy.

arctan
10-17-2006, 10:51 AM
I'm not sure if you'd have much luck getting the SDK to load and compile with anything elseI am. :)

Every C++ compiler does name mangling (http://en.wikipedia.org/wiki/Name_mangling) differently, so C++ code from different C++ compilers will always be incompatible. Heck, you can't even count on two different versions of a single compiler being compatible.

If you want your code to link with MAXON's code -- which is what a C++ C4D plugin does -- it has to be built with VC++.

unseenthings
10-17-2006, 01:32 PM
I am. :)

Every C++ compiler does name mangling (http://en.wikipedia.org/wiki/Name_mangling) differently, so C++ code from different C++ compilers will always be incompatible. Heck, you can't even count on two different versions of a single compiler being compatible.

If you want your code to link with MAXON's code -- which is what a C++ C4D plugin does -- it has to be built with VC++.

Quoted for agreement... save yourself the immense pain (and a couple days of frustration) of trying to use dev-c++ or other compilers.... it won't work.

PixelStuff
10-17-2006, 04:06 PM
Understood. Therefore I was kind of wondering how they maintain the separate compiles for Mac and Windows. Is it two almost completely separate code bases or a single code base with small branches for compiling on Mac or Windows.

unseenthings
10-17-2006, 04:33 PM
Understood. Therefore I was kind of wondering how they maintain the separate compiles for Mac and Windows. Is it two almost completely separate code bases or a single code base with small branches for compiling on Mac or Windows.
Judging from the SDK and the way it's typically done, it's more or less a single code base with small branches for Mac/Win/Linux/64bit/etc. You either start out that way, or you don't have the cross-platformness in there...

From what I understand, most mac plugins compile straight up (no changes) in visual studio, and I believe the inverse is true for the most part of windows plugins that are brought into Xcode. In other words, most plugins don't require any change from platform to platform (besides the recompile) though I'm sure there are some instances where that may be the case.

All these things are signs of a very well thought out and very well executed SDK. If you've messed with some of the other ones out there (see: 3D Studio Max, or Lightwave (UGH!)) -- you'd really appreciate the maxon one :)

Per-Anders
10-17-2006, 11:41 PM
All you have to do when transfering accross is include the same files into your project, the SDK project is set up to compile on load into whichever platforms environment you're using XCode or VC++, i.e. just double click then hit compile, voila you have your plugin no setting of any variables etc up.

The code base is identical so if you coded well using the API then you shouldn't need any changes between platforms, of course no-one is perfect so something a few things slip through that you then have to fix on one or the other, for instance a divide by zero wont result in a crash on a PC using VC++ but will on a Mac so that's a typical error that might get through if you've been a little sloppy and cause problems, also the compilers will spot different problems, using them both will result in better code!

You have the same source, but a different project on each machine, i.e. an XCode project for the Mac and the VC++ project for the pc, they're included in the SDK folder, so all you have to do on transfering your plugin accross is replace the SDK source code files with your own source code files and filters in the project (usually a single drag & drop process). Then save the project and compile. For dealing with 64bit on pc there are a couple of variables to change in VC++ there's instructions over at plugincafe, it's pretty simple to do though.

CGTalk Moderation
10-17-2006, 11:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.