Support for C++20
-
Hello guys,
We use the Cineware SDK in our projects for a long time (way back from when it was still called Melange). Now the projects had evolved and we needed to update the compiler and STL to include some new features. Cineware SDK is preventing us from doing so because it's not compatible with the new c++20 nomenclature.
Is there a way to fix this sooner than later?
Here are some of the error being output by the compiler:\include\private_ge_mtools.h(633,4): error C2065: 'objectToDelete': undeclared identifier \include\private_ge_mtools.h(687): message : see reference to class template instantiation 'cineware::GeTempDynArray<TYPE>' being compiled \include\private_ge_mtools.h(633,4): error C3861: 'objectToDelete': identifier not found \include\private_ge_mtools.h(674,4): error C2065: 'objectToDelete': undeclared identifier \include\private_ge_mtools.h(674,4): error C3861: 'objectToDelete': identifier not found \include\private_ge_mtools.h(750,4): error C2065: 'objectToDelete': undeclared identifier \include\private_ge_mtools.h(754): message : see reference to class template instantiation 'cineware::GeTempDynStack<TYPE>' being compiledAdded new preview/snapshot window; \include\private_ge_mtools.h(750,4): error C3861: 'objectToDelete': identifier not foundLong object names are now clipped and faded in the scene window; \include\private_ge_mtools.h(936,4): error C2065: 'objectToDelete': undeclared identifierFixed "Reload Texture" not refreshing the preview; \include\private_ge_mtools.h(990): message : see reference to class template instantiation 'cineware::GeTempDynSortSearchArray<TYPE,SEARCH,FLUSH>' being compiledFixed text overlap in the edit window (map channel filename); \include\private_ge_mtools.h(936,4): error C3861: 'objectToDelete': identifier not found \include\private_ge_mtools.h(3122,14): error C2065: 'm_Allocated': undeclared identifier \include\private_ge_mtools.h(3337): message : see reference to class template instantiation 'cineware::SortedArray<TYPE,BLOCK>' being compiledThis is for calling the following define in c4d_system.h
#define DeleteObj(obj) \ do { \ ALLOC_TYPENAME ::std::remove_reference<decltype(obj)>::type* objectToDelete = &(obj); \ if (*objectToDelete) { \ typedef ALLOC_TYPENAME ::std::remove_pointer<ALLOC_TYPENAME ::std::remove_pointer<decltype(objectToDelete)>::type>::type CtorType; \ ((CtorType*) (*objectToDelete))->~CtorType(); \ void* tmpToDelete = *objectToDelete; \ cineware::MemFree(tmpToDelete); \ *objectToDelete = nullptr; \ } \ } while (false) // While ensures the user has to set a semicolon after DeleteObjThank you.
-
Hi @megamau, first of all welcome in the plugincafe community.
Currently our code base is not yet C++ 20 compliant. This is something we are looking into, however when this will be available this will not be back-ported to previous versions. You can try to manually adapt your code, but I'm not sure this is 100% possible due to some operators change from this version and therefor may cause incompatibility with the compiled binaries provided. In any case this is not something we are going to support neither have the ability to help you doing it.
Cheers,
Maxime. -
Thanks for the reply.
No problem if it's not backwards compatible. We will adapt our code to the latest version of the SDK.
Thank you. -
Hi there,
I'm also looking for a cpp20 compatible version of the Cineware SDK - has there been any progress on this?
It's currently a blocker for us updating our VFX software from cpp17 to cpp20.
Hoping for good news!
Cheers,
Tom -
Hey @thomasmfields,
unfortunately not yet. Cinema 4D is targeting C++ 20 since release 2026.0.0 and I had not yet had the time to also move Cineware over. I roughly have it on my backlog to give Cineware a makeover in 2027, which would include CMake and C++ 20 support, as well as some other smaller features. But as always, I cannot give a hard guarantee on that.
In the meantime, I am afraid you would have to ask an agent to do it for you.
Cheers,
Ferdinand -
Hey @ferdinand
Thanks for the reply, and I'm glad to hear that an update to the Cineware SDK is on your radar. Please keep us posted on the progress, as this is a blocker for us.
Regards,
Tom