Errors compiling :-(
-
On 06/06/2014 at 06:57, xxxxxxxx wrote:
What exactly configuration must I have to compile my plugins for Windows?
What software? What versions? What configurations?
Damn!! I thought it would be so much easier.
I already got it working for Mac and I was told it was easier for Windows. Doesn't seem like, so far. -
On 06/06/2014 at 07:09, xxxxxxxx wrote:
Howdy,
Go to the project "Properties". Then in the Configuration Properties, select "General" and change the "Platform Toolset". You'll probably have to do the same for both the API project and the cinema4dsdk project.
Adios,
Cactus Dan -
On 06/06/2014 at 07:46, xxxxxxxx wrote:
AFAIK. You can't build R14++ SDKs with VS2010.
The recommended version is VS2012.
The toolset needed for these SDKs is not available in VS2010. And I don't know of any way to install them short of installing the VS2012 itself.Since VS2013 is the newest version. I would try that version first.
It didn't work when I tried it a long time ago. But I've been told that it works now.-ScottA
-
On 06/06/2014 at 07:56, xxxxxxxx wrote:
Howdy,
Well, I did what Michael Welter suggested in this thread:
https://developers.maxon.net/forum/topic/7430/9251_compling-r15-plugins-in-vs2010&KW=2010... and successfully compiled all of my plugins for both R14 and R15 using MSVC 2010.Â
EDIT:
But there was an issue with the 64bit compiles where I had to turn Optimization off, because of some instability. There didn't seem to be any noticeable performance difference with optimization disabled.Adios,
Cactus Dan -
On 06/06/2014 at 08:18, xxxxxxxx wrote:
Thank you, Dan... it is doing more... but not all the way through
Now I got these errors:1> PolyPaintShader.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : error C2146: syntax error : missing ';' before identifier 'srgb_linear'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : error C2433: 'PolyPaintShaderData::float_t' : 'virtual' not permitted on data declarations
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : error C2061: syntax error : identifier 'float_t'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(38) : warning C4183: 'srgb_linear': missing return type; assumed to be a member function returning 'int'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : error C2146: syntax error : missing ';' before identifier 'linear_srgb'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : error C2433: 'PolyPaintShaderData::float_t' : 'virtual' not permitted on data declarations
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : error C2061: syntax error : identifier 'float_t'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(39) : warning C4183: 'linear_srgb': missing return type; assumed to be a member function returning 'int'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2143: syntax error : missing ';' before 'PolyPaintShaderData::srgb_linear'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2146: syntax error : missing ')' before identifier 'x'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2761: 'int PolyPaintShaderData::srgb_linear(void)' : member function redeclaration not allowed
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2059: syntax error : ')'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2143: syntax error : missing ';' before 'PolyPaintShaderData::linear_srgb'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2086: 'int float_t' : redefinition
1>Â Â Â Â Â Â Â Â Â Â c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(43) : see declaration of 'float_t'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2146: syntax error : missing ')' before identifier 'x'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2761: 'int PolyPaintShaderData::linear_srgb(void)' : member function redeclaration not allowed
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2059: syntax error : ')'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(47) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(55) : error C2660: 'PolyPaintShaderData::srgb_linear' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(55) : error C2660: 'PolyPaintShaderData::srgb_linear' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(55) : error C2660: 'PolyPaintShaderData::srgb_linear' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(58) : error C2660: 'PolyPaintShaderData::linear_srgb' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(58) : error C2660: 'PolyPaintShaderData::linear_srgb' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(58) : error C2660: 'PolyPaintShaderData::linear_srgb' : function does not take 1 arguments
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : error C2146: syntax error : missing ')' before identifier 'or'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : error C2065: 'or' : undeclared identifier
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : error C2146: syntax error : missing ';' before identifier 'irs'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : error C2059: syntax error : ')'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\maxon\cinema 4d r14\plugins\polypaintshader\source\polypaintshader.cpp(83) : warning C4553: '==' : operator has no effect; did you intend '='?
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.46
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========All this code compiles perfectly without errors, in Xcode.
-
On 06/06/2014 at 08:59, xxxxxxxx wrote:
Oh that's right.
I forgot that the reason VS2010 doesn't work for me is because I'm using Vista64 and not Win7.-ScottA
-
On 06/06/2014 at 09:00, xxxxxxxx wrote:
I found out that I have to replace float_t with float.
And that I have to replace "or" with ||.
Damn! Why can't the code be the same!?!? -
On 06/06/2014 at 09:34, xxxxxxxx wrote:
Howdy,
Hehe, well it can be the same if you use standard c++ practices. Â
There are also specific differences between Mac and PC that you can accommodate by using compiler directives like this:
#ifdef __PC // pc code here..... #else // mac code here..... #endif
You can use that same technique to support older versions of the Cinema 4D API:
#if API_VERSION < 15000 // pre R15 code here..... #else // R15 code here... #endif
Using the above techniques will allow you to code once and compile multiple times. If you create your own wrapper functions that wrap different API version calls into your own function, your plugin code will be nice and clean.
Adios,
Cactus Dan -
On 06/06/2014 at 10:21, xxxxxxxx wrote:
It is working fine now... It requires some adjustments but, at least, I can already generate .cdl, .cdl64 and .dylib files
Thank you all. -
On 06/06/2014 at 11:24, xxxxxxxx wrote:
I'm still too noobie to master all that, even if it makes perfect sense