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

    attribute 'nodiscard' requires compiler flag '/std:c++17'

    Cinema 4D SDK
    r20 sdk c++
    4
    16
    2.5k
    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.
    • P
      pim
      last edited by

      I did got an error in the projecttool:

      2b2bca56-09f9-47b2-a059-5fc07d605c47-image.png

      WARNING: net.maxon.devtools(dependencies_perforce.cpp): Definition for net.maxon.interface.sourcecontrol(interface) is missing, did you forget the MAXON_XXX_REGISTER macro? [object_impl.cpp(3846)]

      1 Reply Last reply Reply Quote 0
      • P
        pim
        last edited by

        Ok, it is ok now.
        I had to add the flag not just in the modules, but also in the frameworks (of course).
        Perhaps you can set it in the Project Tool?

        d40f4eb1-fbff-4541-bc62-3cdb4cc2f15a-image.png

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

          Easiest would have been to stick to the recommendations and use the proposed platform toolset/VS version: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_dev_windows.html

          1 Reply Last reply Reply Quote 0
          • r_giganteR
            r_gigante
            last edited by

            Hi @pim , thanks for reaching out us.

            Although you've already set this thread as SOLVED can you, for the sake of a better knowledge-sharing, describe better what you mean by "I tried to update a R20 C++ plugin."? What steps did you actually run through? What version of VisualStudio are you using? What version of ProjectTool did you used?

            Finally, please make sure you use our tagging system to enhance topic search.

            Cheers, R

            1 Reply Last reply Reply Quote 0
            • P
              pim
              last edited by

              Thanks for the answer.

              What I did.
              I got the plugin from about a year ago and changed some code.
              Then I did the same compilation as a year ago.
              Using Windows 10, R20.026, VC++ 2017 (version 15.9.17).

              I did not load a new ProjectTool, so the one I used was from feb 2018.
              I thought that when a compilation is working, no need to change the projecttool?

              I did tag it as R20 C++ and SDK. What other tags should I use?

              M 1 Reply Last reply Reply Quote 0
              • M
                mp5gosu @pim
                last edited by

                I thought that when a compilation is working, no need to change the projecttool?

                This is only part of the truth. You always must ensure that the project tool supports the Cinema 4D version used with.

                P 1 Reply Last reply Reply Quote 0
                • P
                  pim @mp5gosu
                  last edited by

                  @mp5gosu said in attribute 'nodiscard' requires compiler flag '/std:c++17':

                  This is only part of the truth. You always must ensure that the project tool supports the Cinema 4D version used with.

                  How do I know which c4d version is supported by which ProjectTool version.
                  And where can I load 'older' ProjectTools?
                  At this moment I only see the projecttool for R21.

                  1 Reply Last reply Reply Quote 0
                  • P
                    PluginStudent
                    last edited by

                    You find the Project Tool for R20 and R21 on the blog as usual: DOWNLOADS[URL-REMOVED]


                    [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

                    1 Reply Last reply Reply Quote 0
                    • P
                      pim
                      last edited by

                      Thank you.

                      1 Reply Last reply Reply Quote 0
                      • P
                        pim
                        last edited by

                        I am using VC++ 2017 and I just read the following in the documents:

                        Cinema 4D R20 SDK : Visual Studio 2015*
                        ...
                        
                        (*)Using Visual Studio 2017 for Cinema 4D R20 SDK is only supported on Windows 10. The project files must be adapted manually.
                        

                        Could this also cause the issue, because indeed I had to set the toolset to V141 and C++ Language standard to C++17.

                        1 Reply Last reply Reply Quote 0
                        • r_giganteR
                          r_gigante
                          last edited by

                          Well @pim , that's indeed the issue. Sticking to the recommended IDE is always recommended.

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            pim
                            last edited by

                            Ok, clear enough.
                            R21 is luckily VC++ 2017!

                            1 Reply Last reply Reply Quote 0
                            • P
                              pim @r_gigante
                              last edited by pim

                              @r_gigante said in attribute 'nodiscard' requires compiler flag '/std:c++17':

                              Well @pim , that's indeed the issue. Sticking to the recommended IDE is always recommended.

                              Indeed going back to VC++2015 solved the issues.
                              But now I have problems with the python.framework.
                              See https://developers.maxon.net/forum/topic/12439/reading-script-file-into-memory/8

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