Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Support for C++20

    Cineware SDK
    2
    3
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      megamau
      last edited by

      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 compiled
      

      This 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 DeleteObj
      

      Thank you.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        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.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • M
          megamau
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post