THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2003 at 07:02, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ; Mac ;
Language(s) : C++ ;
I'm using CodeWarrior under Windows to build a plugin for a Mac target, and having problems using STL.
If I don't use the STL (Standard Template Library) then it compiles cleanly. My code doesn't need the math library functions (sin(), cos(), etc) but if I use them it still compiles cleanly, so the compiler is finding the maths header/library.
If I add the line:
to the top of the file prior to the 'c4d.h' include, then I get compiler errors saying that cos() and sin(), etc cannot be found. This applies even if I'm not using those functions.
If I move the above include statement to after the 'c4d.h' include, I get a different error stating that 'offsetof' is being redefined.
I note that the STL is not used at all in the SDK examples (which compile cleanly).
So, there seems to be some nasty interaction between the '#include <vector>' and the '#include "c4d.h"', which means that I can't use the STL. This behaviour isn't limited to the vector container, either.
Any comments, suggestions, etc?
Cheers - Steve
On 28/03/2003 at 10:30, xxxxxxxx wrote:
This is how I do it:
void Function(BaseContainer& bc)
using namespace std;
This compiled fine in CW8.
On 28/03/2003 at 11:30, xxxxxxxx wrote:
Aha! Yes, that works - thanks!