Archicad 25 compile error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-08
09:06 PM
- last edited on
2021-09-14
09:28 AM
by
Noemi Balogh
I used Cmake to create the Visual Studio vcxproj file it run without error.
cmake -G "Visual Studio 16 2019" -A "x64" -DAC_API_DEVKIT_DIR="C:\API Development Kit 25.3002" in the publish directory.
When I try to compile in 2019, I get the following errors.
everity Code Description Project File Line Suppression State
Error MSB8066 Custom build for 'C:\API Development Kit 25.3002\Examples\AddonExample\CMakeFiles\732d89a1e72b09b8bddc61f03f9b716a\AddOnResources.stamp.rule;C:\API Development Kit 25.3002\Examples\AddonExample\CMakeFiles\11ca4d47a3aec2bb356bac488405510b\AddOnResources.rule' exited with code 2. AddOnResources C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Severity Code Description Project File Line Suppression State
Error MSB8066 Custom build for 'C:\Users\gteac\Archicad_C++\Tibor\CMakeFiles\aa734dfd9b322fa42576535f2535fe79\AddOnResources.stamp.rule;C:\Users\gteac\Archicad_C++\Tibor\CMakeFiles\e63756136f579f4ec9c201a3279cbe19\AddOnResources.rule' exited with code 2. AddOnResources C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 241
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'C:\Users\gteac\Archicad_C++\Tibor\ResourceObjects\Tibor.res' AddOn C:\Users\gteac\Archicad_C++\Tibor\LINK 1
The other test examples compile without err but there I did not use cmake -- just the supplied vcxproj file in the examples.
Tibor's code does not supply a vcxproj file so I have to use cmake to create one.
I assume that I need to add some path but don't know what.
Anyone get a chance to compile this example and what do I need to do to fix it??
Windows 11 - Visual Studio 2022; ArchiCAD 27
Solved! Go to Solution.
- Labels:
-
Add-On (C++)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-08 10:37 PM
As described in the README.md chapter "Build (Windows)" you should open the project folder in VS 2019 and wait for the CMake config to finish. You might need to adjust the AC_API_DEVKIT_DIR in "CMakeSettings.json" in case you have it installed in a different path than me. After the CMake config is done, you should be able to just build with "Build All".
The commit message of the commit explains a bit which changes I had to make in case you are interested.
I hope this helps and let me know if it works for you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-08 10:37 PM
As described in the README.md chapter "Build (Windows)" you should open the project folder in VS 2019 and wait for the CMake config to finish. You might need to adjust the AC_API_DEVKIT_DIR in "CMakeSettings.json" in case you have it installed in a different path than me. After the CMake config is done, you should be able to just build with "Build All".
The commit message of the commit explains a bit which changes I had to make in case you are interested.
I hope this helps and let me know if it works for you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-09 05:06 AM
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open source file: 'wd4996': No such file or directory AddOn C:\Users\gteac\Archicad_C++\Tibor1\c1xx 1
Any thoughts??
Windows 11 - Visual Studio 2022; ArchiCAD 27

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-09 09:19 AM
Easiest would be to just redownload the repo again. The correct last commit on the "easy_vs_2019_build" has the hash "0011e20f1619464fa6e762c8479b50c22ff6485d".
Or you could go into CMakeLists.txt and in line 7 change "wd4996" to "/wd4996".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-09 12:30 PM
However, now the add-on is not working correctly??
The first publish works fine and publishes to the proper folder, but it does not shut down Archicad at the end. It simply closes the plan and there is a blank Archicad screen with a dialog that says 'Python script running".
After the time out period,the python dialog gives the message of restarting Archicad but the program just hangs Note: Archicad never closed -- just the plan.
If I then click the stop button on the Python dialog, the program crashes with the message:
"Something went wrong.& the application closed unexpectedly"
Don't believe i saw this problem running Tibor's apx addon file directly. But could have made some different settings in the mean time?
Windows 11 - Visual Studio 2022; ArchiCAD 27

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-16 04:11 PM
bschwb wrote:Thanks Bernd for forking and helping to make build easier!
Hey Gerry! I didn't take a close look at your errors, but I was able to compile the project. Please check my fork of Tibor's project where the branch `easy_vs_2019_build` contains a commit which should simplify compilation
Yes, I forgot to upload CompileResources.py to the github repo. Oops, it's corrected now.
poco2013 wrote:You have to run the python script external from Archicad, so not from the Python Palette.
The first publish works fine and publishes to the proper folder, but it does not shut down Archicad at the end. It simply closes the plan and there is a blank Archicad screen with a dialog that says 'Python script running".
If you run it from the Palette, then the python script is not allowed to close the Archicad instance.
Gerry, congrats for the Keynote Add-On btw
