PDA

View Full Version : C++ Plugins using free compiler - success!


astrofish
02-21-2003, 01:44 AM
Hi,
Building plugins for R8 under windows requires VisualC++ or ICC, which generally cost a load of money.

However, you can get a version of VisualC++ free and legally as part of the .NET SDK download from microsoft...
(This version appears to be VC7, but without the IDE, and it's the non-optimising version).

Anyway, I've managed to get this version to successfully build the Cinema4D R8 SDK plugins without any problems, and I've put the required 'project' files and a mini tutorial on my website: www.astrofish.com

So, anyone (on a PC) who has been put off messing around with plugins because of the cost of the compiler no longer has any excuse not to play (unless of course the 130MB download from MS is more than you can handle).

Cheers - Steve

ThirdEye
02-21-2003, 02:32 AM
Thank you astrofish :wavey:

Per-Anders
02-21-2003, 04:42 AM
well done, now all that's needed is the same for a mac compiler and ther'll be no excuse whatsoever.

Arrias
02-21-2003, 08:40 AM
Nice:thumbsup:
I'm just wondering, would it be possible to get it compile with g++ (namely mingw with DevC++ as the IDE) if I used the Visual C++ 6 learning edition librarys and headers aswell as the normal mingw ones(that way I'd save myself the 130meg download)?

I would test it out myself but I've no plugin to compile and haven't gotten arround to learning the C4D API or how to compile thigns for it *pokes studdies, modeling etc*

astrofish
02-21-2003, 10:31 AM
I would be _totally_ happy if anyone can get it to work with g++, or any other compiler for that matter.

Unfortunately, starting with R8, C4D depends on some VisualC++ options which it seems that no other compiler has equivalents to.

I've tried to get it to work with CodeWarrior under Windows (works with R7, and lets you build both Mac and PC versions on a PC), but no luck for PC under R8.

Other people have tried and failed to get the Borland compiler to work with R8 (although again, it apparently works with R7).

So, it seems that we're stuck with VisualC++/ICC under windows.

The other thing that wants doing is to find an IDE that can be used with the free VisualC++.

Dev-C++ is very nice, but it assumes that the compiler and linker are the same program (which they are for gcc/g++, but not for VisualC++) so I don't think it can be used as is.

There are many others however, I've just not had time to look through them.

Arrias
02-22-2003, 09:41 AM
Erg, that's a shame. Which VC++ specific things does it require to make it?

As for using Dev for the free Visual compiler, wouldn't it be possible to write an intermediatory program that takes the compiler & linker commands and library references form dev, catches the feedback from the free compiler, passes that back to Dev if there are any errors and if there aren't any then it passes objects and linker commands to the free linker, then passes back errors or success to dev (all in a g++ manner).
(That was a long sentence :surprised )

A bit of a long winded way of going about it but it might work.

astrofish
02-22-2003, 11:05 AM
Hi Arrias,
The R8 SDK documentation says (Index->Project Structure):

- 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!

Based on various discussions, it seems that this is the problem when trying to use other compilers.

If anyone knows the equivalent of these flags for any other compiler, please let us know!


Your suggestion about making an intermediate program that Dev-C++ calls, and which in turn calls the compiler or linker is an interesting one.
I reckon that could probably work. I'll have a think about it...

Cheers - Steve

CGTalk Moderation
01-14-2006, 11:00 AM
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.