The engine - acknex.dll - can be used by other programs or programming languages, like VC++, Delphi, or Visual Basic. The methods to call engine functions and access engine variables are the same as for writing engine plugins.
The library and SDK were created with VC++ 2005, but you can also use VC++ 2003 or 2008. Here's a step by step instruction for creating a simple engine application with VC++ 2008.
1. Under New Project, create a Win32 Project. Select Windows Application and Empty Project (if you already have the source code, such as the e_tutorial.cpp example). Otherwise check out sdk_engine\e_tutorial.cpp to see how your code should look like.
2. Open Project Properties by right clicking on the project in the Solution Explorer, and give the path to the engine library and header files. They can be found in the sdk_engine folder. If your Gamestudio folder is located at c:\program files\gstudio7, enter:
Additional Include Directories: "c:\program files\gstudio7\sdk_engine"
Additional Library Directories: "c:\program files\gstudio7\sdk_engine"
3. Make sure to link acknex.lib to your application. You can either use Project Properties / Linker Input / Additional Dependencies, or give the library directly in the source with a #pragma statement:
#pragma comment(lib,"acknex.lib")
(With old compiler versions, you might need to set up the linker to Ignore the libc.lib, and add libcmt.lib instead to the Linker's Additional Dependencies. This is not necessary for new compilers such as VC++ 2008)
4. Include adll.h in your source. When you want to use the var class, also include var.h before adll.h, and add var.cpp to the Source Files folder (see e_tutorial.cpp).
5. Under Project Properties, use a Post-Build Event to create the acknex.dll through a WED command line. Enter:
Post-Build Event: "c:\program files\gstudio7\WED.exe" -p $(TargetDir)\$(TargetFileName)
The acknex.dll is bound to your particular EXE, so it must be created whenever you compile a new EXE. This happens automatically with the above command line in the Post-Build-Event.
You're done! For distributing your executables, please follow the license conditions mentioned in the readme file in the sdk_engine folder.
For accessing the engine, the same functions and variables as described in the Plugin SDK chapter can be used. So it is strongly recommended that you read that chapter before. In the following three lessons you'll be walked through writing simple engine programs. The source code can be found in the in the sdk_engine folder.
► latest version online