AIInterface:C: Difference between revisions

From Spring
Jump to navigationJump to search
Hoijui (talk | contribs)
mNo edit summary
Flozi (talk | contribs)
m 1cat
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{AIInterface|C|hoijui|0.1 (spring GIT)|C & C++|working|GNU GPL v2+}}
{{AIInterface|C|hoijui|0.1|C & C++|~stable|GNU GPL v2+}}


=== 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/AIExports.h'' for reference).
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/''), and possibly the Java one.


=== AIs using it ===
=== Used By ===
* '''[[AI:KAIK|KAIK]]'''
==== AI Interface Wrappers ====
* '''[[AI:RAI|RAI]]'''
* '''[[AIWrapper:LegacyCpp|Legacy C++ Wrapper <font color="red">DEPRECATED</font>]]'''
* '''[[AI:AAI|AAI]]'''
* '''[[AIWrapper:Cpp|(New) C++ Wrapper <font color="00AAFF">alpha</font>]]'''
* '''[[AI:NTAI|NTai]]'''
* '''[[AI:NullAI|NullAI]]'''
* '''[[AI:NullLegacyCppAI|NullLegacyCppAI]]'''


=== Download ===
==== Skirmish AIs ====
It comes with spring current dev version (GIT branch ''caiinterface'').
* None (directly)


=== Known Crashes ===
==== Download ====
It comes with a spring default install.
 
==== Source ====
The source can be found under:
''{spring_source}/AI/Wrappers/LegacyCpp/''
 
==== Bugs ====
'''Known Crashes:'''
* None
* None


=== How to compile ===
Please report bugs under
[http://springrts.com/mantis/ Mantis]
to the AI subproject.
 
==== How to compile ====
'''The easy way'''<br>
'''The easy way'''<br>
Use Scons or CMake (refer to [[Building_spring|Building spring]]).
Use Scons or CMake (refer to [[Building_spring|Building spring]]).
Line 35: Line 44:
tested under Linux32 and Win32
tested under Linux32 and Win32


=== How to install ===
==== How to install ====
from: ''{spring_source}/AI/Interfaces/C/''
from: ''{spring_source}/AI/Interfaces/C/''<br>
to: ''{spring_data_dir}/AI/Interfaces/C/{C-AIInterface-version}/''
to: ''{spring_data_dir}/AI/Interfaces/C/{C-AIInterface-version}/''
* copy ''lib*.so'', ''lib*.dylib'' or ''*.dll'' to ''.''
* copy ''lib*.so'', ''lib*.dylib'' or ''*.dll'' to ''./''
* copy ''data/*'' to ''.''
* copy ''data/*'' to ''./''


''' [[AIs|<- Back to AI page]]'''
''' [[AIs|<- Back to AI page]]'''
[[Category:AIInterface]]
 
[[Category: AIWrapper]]

Latest revision as of 18:54, 20 March 2013

C
Developer
hoijui
Version
0.1
Language Support
C & C++
Status
~stable
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/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/), and possibly the Java one.

Used By

AI Interface Wrappers

Skirmish AIs

  • None (directly)

Download

It comes with a spring default install.

Source

The source can be found under: {spring_source}/AI/Wrappers/LegacyCpp/

Bugs

Known Crashes:

  • None

Please report bugs under Mantis to the AI subproject.

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

<- Back to AI page