We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Problem with compiling API Example using Visual Studio 2019 for Archcad26

HTu
Participant

Hi Everyone,

 

Hoping someone can give us a hand in solving the following problem.  

 

We just downloaded the API Development Kit for Archicad 26 and tried to compile an example API. But ran into problem.

We went through the CMake process OK. Only when we compile the API, we get this error message:

 

Build started...
1>------ Build started: Project: AddOnResources, Configuration: Release x64 ------
1>Compiling resources...
1>Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'E:\1 Archicad Files (Development)\Master Programs 26\API Development Kit 26.3000\Examples\ModelAccess_Test\Build\CMakeFiles\69fd9e82a36165e3bbe470f6a12f7cbe\AddOnResources.stamp.rule;E:\1 Archicad Files (Development)\Master Programs 26\API Development Kit 26.3000\Examples\ModelAccess_Test\Build\CMakeFiles\46eec407b29081a3fc63c07494a37adf\AddOnResources.rule' exited with code 9009.
1>Done building project "AddOnResources.vcxproj" -- FAILED.
2>------ Build started: Project: AddOn, Configuration: Release x64 ------
2>LINK : fatal error LNK1181: cannot open input file 'E:\1 Archicad Files (Development)\Master Programs 26\API Development Kit 26.3000\Examples\ModelAccess_Test\Build\ResourceObjects\ModelAccess_Test.res'
2>Done building project "AddOn.vcxproj" -- FAILED.
3>------ Skipped Build: Project: ALL_BUILD, Configuration: Release x64 ------
3>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 1 skipped ==========

 

Do we need Python to compile the API ?

Thanks in advance for any idea to over come the problem.

 

Hoa

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Hoa,


The need for python is dependent on how the Add-On build process is setup. For the examples included in the API DevKit it's needed. I would recommend to install Python via the Visual Studio Installer. Then it should be available for Visual Studio to use when building your project. See the screenshot (I use VS 2022 but VS 2019 should be the same in this regard):
Screenshot 2022-09-14 111420.png


In case it's still not found, you might need to add the Python path to the PATH environment variable.

 

Best,
Bernd

View solution in original post

4 REPLIES 4
Solution

Hi Hoa,


The need for python is dependent on how the Add-On build process is setup. For the examples included in the API DevKit it's needed. I would recommend to install Python via the Visual Studio Installer. Then it should be available for Visual Studio to use when building your project. See the screenshot (I use VS 2022 but VS 2019 should be the same in this regard):
Screenshot 2022-09-14 111420.png


In case it's still not found, you might need to add the Python path to the PATH environment variable.

 

Best,
Bernd

Hi Bernd,

Thanks for your reply.

This has been a great help.

Best regards,

Hoa

 

 

I didn't mention installing Python here, but I found out that I had to install Python and configure the above settings.

AC27 on window 11
hlipperjohn
Newcomer

The error message "python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from settings" typically occurs when you try to run a Python script, but Windows is unable to locate the Python interpreter. To fix this, you can either install Python from the Microsoft Store by running it without any arguments (just type "python" in the command prompt and follow the installation prompts) or you can disable this specific shortcut in the Windows settings if you don't intend to use it. Installing Python from the Microsoft Store ensures that the Python interpreter is readily available for running scripts and applications on your system.