attribute 'nodiscard' requires compiler flag '/std:c++17'
-
I now see that the flag was added in All Options, but still no success.
-
Also tried Language >> C++ Language Standard, but still no success.
I do this for all 3 modules.
-
I did got an error in the projecttool:
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)]
-
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? -
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
-
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
-
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?
-
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.
-
@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. -
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.
-
Thank you.
-
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.
-
Well @pim , that's indeed the issue. Sticking to the recommended IDE is always recommended.
-
Ok, clear enough.
R21 is luckily VC++ 2017! -
@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