Re-build plugin for R20 - missing file "delegate.h"
when trying to recompile a plugin for R20 using the latest "cinema.framework" I get a "missing file" error (on Mac):
/frameworks/cinema.framework/source/c4d_customgui/customgui_description.h:15:10: 'c4d_misc/datastructures/delegate.h' file not found
This file is referenced from other R20 SDK's includes. Indeed, such a file does NOT exist at that location. The parent include looks like this:
#ifdef USE_API_MAXON #include "maxon/delegate.h" #else #include "c4d_misc/datastructures/delegate.h" #endif
I have not defined
USE_API_MAXONin my build because I don't use the new maxon API. Defining it anyways gives me tons of syntax errors due to old R19 code.
r_gigante last edited by r_gigante
it seems like you're attempting to create hybrid plugins mixing classic API with new API. Could you please check that
C4D=trueis actually used in your projectdefinition.txt as reported in the Project Tool section of the C++ API docs?
@r_gigante No, the
C4D=truewas not set in the project file. Once I added it I noticed that it also enables
USE_API_MAXON, and now I get tons of R19 syntax errors back! Seems there is no way around fixing those (which I was thinking in the first place ;)
r_gigante last edited by
porting pre-R20 plugins to R20 definitively requires to review the code and deliver the changes needed to make it nicely work with the new API structure and syntax.
I warmly suggest to run through all of them and fix accordingly to what stated on the Plugin Migration section of the Cinema API C++ documentation.
Last but not least, consider that a few of the issue might be due to code-style strictness level: in such case you can consider to lower the code-style strictness (see style-check) for an initial transition and concentrate on design issues.
@r_gigante I wonder, is it REQUIRED to set
USE_API_MAXONin my project when re-compiling old plugins for R20? It seems that, if not set, certain #includes from cinema.framework do not compile.
r_gigante last edited by
USE_MAXON_APIbeing defined - actually using
C4D=truein projectdefinition.txt - is required in order to be sure that all the cinema.framework classes are properly compiled. Although there could be situations where some cinema.framework classes can work without that define, we highly discourage this approach since you can end up in situations where the code compiles until you include that specific class which indeed needs that define (which it's already happening in that case).
C4D=trueactually brings too much pain, please open a new thread and let's proactively discuss the issues your code is facing and let's get rid of them.