Archicad C++ API
About Archicad add-on development using the C++ API.

archicad25 is build successful, but archicad26 is build failure.

CNVSJH
Participant

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??

4 REPLIES 4

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

Thanks for the reply.

 

I am using Visual Studio solutions directly.

 

- Is the Platform Toolset setting in the Solution Properties be set to v142?

  • Yes, I have it set to v142, so it works fine with ArchiCAD 25.

- Are all custom build steps for resources using the right DevKit (i.e. 26)?

  • Yes, I specified Devkit 26 for all custom build steps for resources.


- Are all necessary libraries included from the correct DevKit (i.e. 26) directory?

  • Yes, all necessary libraries are included correctly from the Devkit 26 directory.

- Are the include directories set to the correct DevKit version?

  • Yes, I specified all include directories using absolute paths.
CNVSJH
Participant

It hasn't been resolved yet. Is there anyone who can help me?...

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.

 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!