AIInterface:C

From Spring
Revision as of 16:46, 8 October 2008 by Hoijui (talk | contribs)
Jump to navigationJump to search
C
Developer
hoijui
Version
v0.1 (spring SVN)
Language Support
C & C++
Status
working
License
GNU GPL v2+
<- Back to AI Interfaces

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/AIExports.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/).

Currently supported AIs

Download

It comes with spring (SVN version).

Known Crashes

  • None

How to compile

  • include directories: {spring_source}/rts/System {spring_source}/AI/Interfaces/C
  • source files: {spring_source}/AI/Interfaces/C/*.cpp
  • create dynamic loadable shared library (module)
  • should compile with all C++ compilers

How to install

from source at {spring_source}/AI/Skirmish/NullAI/ :

  • copy libC-0.1.so, libC-0.1.dylib or libC-0.1.dll to {spring_data_dir}/AI/Interfaces/impls/
  • copy InterfaceInfo.lua to {spring_data_dir}/AI/Interfaces/data/C-0.1/

<- Back to AI page