Right now there is a problem regarding Visual studio AIs vs Mingw32 spring builds.
I am struggling to get the correct exports on ym AI, I cannot get a function name handleevent using stdcall that doesnt have an @ and a number on the end.
e.g. _handleEvent@12
To get the AI t interface with spring at all requires a change which zerver reverted because it broke visual studio builds of spring, in exportdefines.h, but to get the required function names exported needs cdecl, which won't work and generates debugger messages after startup and other undefined behaviour
I'm using visual studio 2008, using mingw32 is not an option for me. I currently have deadlines to make, and this si my nubmer one stalling block for all future development at the moment.
Interface Calling conventions
Moderators: hoijui, Moderators
Re: Interface Calling conventions
you need a .def file, it'll fix everything. my KPAI has this:
it's also a problem in mingw builds, but it can be solved in a different way there (-Wl,kill-at).
Code: Select all
LIBRARY "KPAI"
DESCRIPTION 'Baczek\'s Kernel Panic AI'
EXPORTS
; Explicit exports can go here
init @1
handleEvent @2
release @3
getLevelOfSupportFor @4
Re: Interface Calling conventions
Thanks, that fixed it =]
Re: Interface Calling conventions
I'm still getting messages like this as soon as it starts interacting more with the interface =/
edit :: nevermind,it seems my change to exportdefines is no longer needed thanks to the above fix, its gettng further nowRun-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.