Visual Studio the C API

Visual Studio the C API

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Visual Studio the C API

Post by AF »

I will outline the necessary steps, however I would like to point out first that the main reason people wanted a C api was because we couldn't use visual studio any more due to C++ ABI compatibility differences, and now we're being told we should build using cmake/scons and being dismissed?

If this is the way things are headed then the API may well be digging its own grave for new C++ and C AI developers, nevermind academic interest.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Visual Studio the C API

Post by imbaczek »

I'm making a C++ AI using the C interface and I can attest it works. Debugging works too, complains about spring.exe symbols but you can step in/out at source level and see local variables, etc, as long as you're at AI scope. You need proper defines, tho.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Visual Studio the C API

Post by AF »

Mine used to build until some changes were made and I need to use the API callbacks that determine where to read and write from the file system, but that function relies on a single function in util.c and adding that file results in hundreds of errors =(

In the meantime, the basic premise to convert an old c++ AI to visual studio involves adding 3 pre-processor definitions to the project, a tonne of files for the c++ legacy wrapper and C exports, one or two extra include paths, modifying a lua file, and changing the output directory to fit into the new folder structure.

A few other compatibility changes may be needed but I and hoijui seem to have fixed most of them except the util.c problem, such as WIN32 versus _WIN32 or function export signatures etc, which hoijui once said he had a fixed version but its not committed yet =s Im currently working with Visual Studio 2008
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Visual Studio the C API

Post by imbaczek »

sent a PM
Post Reply

Return to “AI”