AIInterface:C: Difference between revisions
From Spring
Jump to navigationJump to search
mNo edit summary |
m typo |
||
| Line 2: | Line 2: | ||
=== Description === | === Description === | ||
This AI interface is written in C++ and allows spring to load AIs written in C and C++. Thes AIs may be compiled with any compiler, as long as they export some C functions in the correct way (see ''{spring_source}/AI/Skirmish/NullAI/ | This AI interface is written in C++ and allows spring to load AIs written in C and C++. Thes AIs may be compiled with any compiler, as long as they export some C functions in the correct way (see ''{spring_source}/AI/Skirmish/NullAI/AIExport.h'' for reference). | ||
If you plan to write your own AI interface library, it is recommended to use this one as a template, or at least for reference (''{spring_source}/AI/Interfaces/C/''). | If you plan to write your own AI interface library, it is recommended to use this one as a template, or at least for reference (''{spring_source}/AI/Interfaces/C/''). | ||
Revision as of 23:10, 31 May 2009
| Developer | |
| Version | |
| Language Support | |
| Status | |
| License | |
Description
This AI interface is written in C++ and allows spring to load AIs written in C and C++. Thes AIs may be compiled with any compiler, as long as they export some C functions in the correct way (see {spring_source}/AI/Skirmish/NullAI/AIExport.h for reference).
If you plan to write your own AI interface library, it is recommended to use this one as a template, or at least for reference ({spring_source}/AI/Interfaces/C/).
AIs using it
Download
It comes with spring source, current development version (GIT branch caiinterface), reffer to Obtaining the Source.
Known Crashes
- None
How to compile
The easy way
Use Scons or CMake (refer to Building spring).
The hard way
- include directories:
- {spring_source}/rts/System
- {spring_source}/AI/Wrappers/CUtils
- {spring_source}/AI/Interfaces/C
- source files:
- {spring_source}/AI/Interfaces/C/*.c*
- create dynamic loadable shared library (module)
- should compile with all C++ compilers (tested with: MinGW, GCC, Intel)
tested under Linux32 and Win32
How to install
from: {spring_source}/AI/Interfaces/C/
to: {spring_data_dir}/AI/Interfaces/C/{C-AIInterface-version}/
- copy lib*.so, lib*.dylib or *.dll to ./
- copy data/* to ./