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

GDL
About building parametric objects with GDL.

Visual C++ 2005 express

Anonymous
Not applicable
Hi All
Should the above be able to compile the example api's? I get the following when I compile the Notification Manager;
1>.\Src\Tool_Observer.cpp(44) : error C2220: warning treated as error - no 'object' file generated
1>.\Src\Tool_Observer.cpp(44) : warning C4996: 'sprintf' was declared deprecated
1> C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(345) : see declaration of 'sprintf'
1> Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>Selection_Observer.cpp
1>.\Src\Selection_Observer.cpp(42) : error C2220: warning treated as error - no 'object' file generated
1>.\Src\Selection_Observer.cpp(42) : warning C4996: 'sprintf' was declared deprecated
1> C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(345) : see declaration of 'sprintf'
1> Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
ETC ETC

I am a newbie to C++ but have a lot of GDL/RPL/Javascript/VBScript blah blah experience Shouldnt the examples at least compile or is there incompatibility between VC++?
Thanks for any help
Mark
6 REPLIES 6
Karl Ottenstein
Moderator
The examples were created for use with VS 2003. Use of any other versions of Visual C++ / Visual Studio or other software (Windows; Code Warrier for PPC / X-Code for Intel on OS X) requires twiddling, if possible at all. Please read similar threads in this forum.

There are a lot of project settings that are incorporated into the visual studio project file and which one might not immediately guess without experience, so using 2003 is definitely recommended as the painless method of getting going with the API SDK.

Because of your other post, please do note that the API SDK is not the same as the GDL SDK. One creates general add-ons for ArchiCAD itself. The other creates add-ons for GDL, providing new REQUEST functionality.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Thanks for your help Karl. I realise that the mvo info has been implemented for newer versions but it seems the usual rules of inverse simplicity apply! MVO info access is SO essential
All the best
Mark
stefan
Advisor
FWIW, you can disable the DEPRECATED warnings in VC 2005 by defining "_CRT_SECURE_NO_DEPRECATE".

But that only applies to the code you compile yourself.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
Anonymous
Not applicable
Karl wrote:
The examples were created for use with VS 2003...
is it possible to use Visual Studio 2005?

I got the following error when I try to convert a VS 2003 project to VS 2005:

Error 2 error PRJ0019: A tool returned an error code from "Compiling the RC2 file..."
Anonymous
Not applicable
Does anyone know where you can get a some free download of VS2003 or similar that will build the API examples- even a limited version- just to get started with?
stefan
Advisor
Mark wrote:
Does anyone know where you can get a some free download of VS2003 or similar that will build the API examples- even a limited version- just to get started with?
The Express versions are free and include the IDE.

There is/was the VS2003 toolkit at
http://msdn2.microsoft.com/en-us/visualc/aa336490.aspx
which is only the compiler.

You probably need to add the Microsoft Win32 SDK.

Not sure if this could work for ArchiCAD development.

Anyways, it is not available anymore.
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad28/Revit2024/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book