Plugin doesn't support the required sdk [SOLVED]
On 17/10/2016 at 15:03, xxxxxxxx wrote:
Cinema 4D Version: 17
Platform: Windows ;
I'm trying to incorporate our C4D plugin into our nightly build scripts, and it seems to work. However, on Windows, when we try to load the plugin we see an error message like this:
C4D Debug Output Start... CINEMA 4D Start... Error: plugin (foo.cdl64) doesn't support the required sdk
I'm assuming/guessing we're missing some preprocessor define(s), but I can't figure out which ones we need. If I compile the plugin via the VisualStudio IDE then it works without issue. The only difference I can see is the binary that the IDE created is a lot smaller than our build scripts. Can someone explain the error? How does C4D figure out what sdk the plugin is using? I tried searching on the forum and Google, but couldn't find anything relevant.
For what it's worth, these are the preprocessor defines we're using (internal ones to us have been removed) :
-DMSVCVERS=12 -D__64BIT - -D_WINDLL -DWIN64 -PRIVATE_MODULE_ID=net.maxon.c4d.cineman -D_CONSOLE -D__STL_HAS_NAMESPACES -D_UNICODE -DBits64_ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING -DUNICODE -DMAXON_TARGET_RELEASE -D_WIN32 -D__C4D_64BIT -D__PC -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -DWIN32 -DMAXON_API -DRMAN_VERSION=21.2 -DPRIVATE_MANGLED_MODULE_ID=net_maxon_c4d_cineman -DPSAPI_VERSION=1 -D_CRT_SECURE_NO_WARNINGS -DMAXON_TARGET_WINDOWS -D_WIN64 -DMAXON_TARGET_64BIT -D_WINDOWS
On 18/10/2016 at 08:31, xxxxxxxx wrote:
Hi Ian, thanks for writing us.
With reference to the issues reported I was able to reproduce the behavior and I can confirm that it's not related to any of the preprocessor define(s) but rather to linking to a newer cinema.framework and then loading the plugin in an older revision of Cinema.
Maybe your nightly build script is pointing to the R18 cinema.framework during the building process and, in the end, you come out with a plugin not loadable in R17.
Concerning the size, I wonder if the plugin generated from the IDE is in release mode whilst the one coming out from the nightly build is a debug build. This might explain the different sizes of the twos.
Last consideration is about the defines you've reported in your post: among all only those in green are set in the cinema4dsdk project normally found in the plugins folder of your Cinema installation and are sufficient to build standard C4D plugins.
Hoping these few lines might shed some light over there, feel free to come back for anything else.
PS if something still won't work as expected I might need to check your makefile or similar to better understand what's going on thus in this case, feel free to contact me via email.
On 18/10/2016 at 12:08, xxxxxxxx wrote:
Thanks for the reply.
What you said makes sense, but I'm not sure how that could be in my situation. I am trying to load the plugin in R17.
I do have R18 installed on my machine but the Cinema framework that's checked in to our source control should be from R17 (it was checked in long before R18 was ever available to us). However, I wasn't the one who built and checked it in, so it could very well be an issue with the framework. I tried copying over the framework with the one built on my machine via the IDE, but then it crashes with:
C4D Debug Output Start... CINEMA 4D Start... Error: application crashed C4DUnhandledExceptionFilter: writing exception info C4DUnhandledExceptionFilter: writing call stacks
I don't know if this due to us using the Intel compiler for our nightly builds. I'll e-mail you the build commands being used.
On 18/10/2016 at 23:18, xxxxxxxx wrote:
I've received the email and I'm going to have a look at the script (which at a first sight looks pretty "nice") shortly.
I'll keep you updated on new findings.
On 20/10/2016 at 02:41, xxxxxxxx wrote:
following further analysis based on your inputs, the issue reported is basically related to one file wrongly configured in the cinema.framework project file in the Cinema framework for the 17.016 revision, which you're using on your nightly build server.
The file responsible is "register.cpp" (normally found under <cinema_folder>/frameworks/cinema.framework/generated/hxx/register.cpp) which, on certain conditions, isn't properly generated and invalidates the build process generating a plugin which, once loaded in 17.016, appears as it was created with a newer framework.
To solve the issue, we strongly recommend to update to the latest R17 version (currently 17.055) via the MAXON Online Updater and recompile the plugin.
On 25/10/2016 at 09:03, xxxxxxxx wrote:
Just to close this out, in case anybody else ever runs into this. Apparently, we were missing three compiler switches in our nightly build system:
/bigobj /vmg /vms
Big thanks to Riccardo for sending us his scripts!