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

ArchiCAD Build Plugin ResConv problems - n00b

Anonymous
Not applicable
Okay, I start visual studio, create an ArchiCAD plugin from the provided template, set up the build event to copy it automatically to the Add-On folder, and try to compile. However, every time it trys to compile the resource files, ResConv crashes. Debugging this error shows that the function "lock_file" in _file.c is getting a null pointer as the parameter. I get this problem with some of the samples as well, however I've compared the resource files against the few that work and they are identical. Can anyone tell me what might be causing the resource editor to crash? Thank you
3 REPLIES 3
Andras Babos
Graphisoft Alumni
Graphisoft Alumni
Please describe your development environment (OS version, Visual Studio version, APIDevKit version, ArchiCAD version, etc. - anything else that comes to mind...), otherwise I cannot reproduce the bug. Thanks.

Andras.
Anonymous
Not applicable
I think I'm have a similar problem in VS 2005 .net , with ArchiCAD 9 E , and the ArchiCAD API,

Error 1 fatal error RC1015: cannot open include file 'Dll_Test.grc.rc2'. c:\Program Files\Graphisoft\API Development Kit 6.1\Examples\Dll_Test\RFIX.WIN\Dll_Test.rc2 19

Error 2 error PRJ0019: A tool returned an error code from "Compiling the RC2 file..." Dll_Test

What do I do in VS 2005.net to compile? Soluton conversoin works ok ...
Andras Babos
Graphisoft Alumni
Graphisoft Alumni
Hi Todd,

Two things:
1. I do not know how the solution conversion works, but to compile the GRC files, you need a complex custom build step. Please check the custom build step attached to the GRC files in VS .NET 2003, or look inside the .vcproj files you're trying to convert. Make sure the build step stays the same in the converted VS .NET 2005 project as well.
2. As ArchiCAD was compiled with VS .NET 2003, it's usually a bad idea to compile your Add-Ons with another version. Even though the function addresses (and decorated names) might stay the same, it still means you're using a different runtime library in your Add-On than ArchiCAD does. Which means that if in a given function ArchiCAD allocates memory in one runtime library, then you throw it away with an other one... Well, who knows what kind of errors might pop up? Simply put, Add-On development is not supported this way.

HTH:
Andras.

PS: I do not think you two have the same problem though...