When I try to run Visual Studio 2022 following a similar procedure to that documented in Rhino - Creating your first C/C++ plugin for Rhino
it fails when trying to create a new project as the Rhino 8 Plugin Wizard cannot be found:
Here is what it looks like when I follow the guideline with Rhino 7 and Visual Studio 2019:
In Rhino 7 the Time to adjust views is only 88 ms:
while in Rhino 8 it takes nearly 2 sec or over 20x slower:
Does this make sense to you given the state of development of Rhino 8?
VS2022 was released last week. We do not have project wizards for it yet. If you have an existing project from VS2019, you should be able to open it in VS2022.
As for the second question, I don’t know why the timing difference exists. We would need to figure out how to repeat this on one of our machines to be able to make any sort of fix.
I made a copy of my VS2019 project and opened it in VS2022. Then I set the Platform Toolset to Visual Studio 2022 (v143) and C++ Language Standard to Preview which should select C++20 compiler. See below.
Everything works with C++17 selected in VS2022 and my C++ DLL gives correct results when called by my IronPython script in Rhino 7 and Python 3.9 in Rhino 8.
The most frequent error is the use of or and xor as an argument name:
I think C++ 20 treats these as a reserve work so it cannot be used as an argument name. One suggestion I see is to change it to xor_ in the header and body. This keeps it on the same semantic level as xor for understanding but avoids the compiler problem.
A similarly frequent error is identifier not found which I do not understand as the same code compiles in C++17.
Overall there seems to be only a tiny number of errors in the Rhino SDK code.
Looking for help here. There are some specific C++ 20 enhancements I am looking forward to using so I want to help solve these problems in any way I can.
Sorry I won’t be able to help with this yet. I do not even have VS2022 installed on my computers yet as another developer at McNeel is going through the process of figuring out what we need to do to upgrade to VS2022 for compiling without breaking our SDK.
Any progress on getting Visual Studio 2022 working with C++ 20 for creation of Rhino plugins and C++ DLL’s? Currently the Rhino 7 SDK will not compile in C++ 20 but this is due to only 18 errors, which I documented in a post above.
I can get Visual Studio 2022 to work for generating my C++ DLL’s by copying over a VS 2019 project and limiting myself to using C++ 17. So Visual Studio 2022 seems good to go. I think I just need a Rhino 7 SDK that compiles in C++ 20.