2023-04-04 08:18 AM
Hi, everyone here.
I am developing an add-on using visual studio 2022.
In archicad 25 version, it is debugged without problems using v142.
However, an error occurs in archicad 26 version.
"VC++ 2019 v142 toolset is required. You can install it from a Visual Studio 2019 or later installer, or from a Build Tools for Visual Studio 2019 or later installer."
But I installed v142 toolset and it works fine on archicad 25 version.
Why does this error only occur in archicad 26 version?
Does anyone know of a problem like this??
2023-04-04 08:57 AM - edited 2023-04-04 08:57 AM
Yes I've had similar errors before. It depends a lot on how you've setup your project. Are you using CMake or directly Visual Studio Solutions?
If you are using CMake then you should check if you are using the correct generator and toolset. I'm specifying it via CMakePresets for example:
.....
{
"name": "windows-base",
"description": "Target Windows with the Visual Studio development environment.",
"hidden": true,
"inherits": "base",
"generator": "Visual Studio 17 2022",
"architecture": {
"value": "x64",
"strategy": "set"
},
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "ac26-win",
"description": "AC26 Windows Configuration",
"inherits": "windows-base",
"hidden": true,
"toolset": {
"value": "v142",
"strategy": "set"
},
....
If you are using Visual Studio Solutions directly then I suggest checking the following things:
- Is the Platform Toolset setting in the Solution Properties be set to v142?
- Are all custom build steps for resources using the right DevKit (i.e. 26)?
- Are all necessary libraries included from the correct DevKit (i.e. 26) directory?
- Are the include directories set to the correct DevKit version?
Best,
Bernd
2023-04-04 09:07 AM
Thanks for the reply.
I am using Visual Studio solutions directly.
- Is the Platform Toolset setting in the Solution Properties be set to v142?
- Are all custom build steps for resources using the right DevKit (i.e. 26)?
- Are all necessary libraries included from the correct DevKit (i.e. 26) directory?
- Are the include directories set to the correct DevKit version?
2023-04-10 04:26 AM
It hasn't been resolved yet. Is there anyone who can help me?...
2023-04-10 10:57 AM
If you post a stripped down version of your project, I could take a look and see if I have the same issues with compiling it and maybe debug it that way. So just remove everything that's your personal code and just leave the basic Add-On structure, but make sure the error still happens on your side.