http://darkstars.co.uk/2010/vs2008-ais-and-the-c-api/
I've put up a pre-packaged empty project with instructions and fixes. I've automated stuff like copying over AIInfo.lua, and added in the dll calling conventions and export fixes.
It's based on the C++ Test AI in the spring repo.
VS2008 + AIs using the C++ Wrapper
Moderators: hoijui, Moderators
Re: VS2008 + AIs using the C++ Wrapper
good stuff.
Re: VS2008 + AIs using the C++ Wrapper
Have you managed to setup project so debug symbols are built into DLL, and Spring really uses them in its crash handler? I could achieve this only with external PDB file which is inconvenient to distribute. I tried to link with /Z7 mode when symbols are built in obj files, but Spring does not use them.
Re: VS2008 + AIs using the C++ Wrapper
I didn't think it was possible in the first place what with the compiler differences?
Re: VS2008 + AIs using the C++ Wrapper
yeah, that's not possible. VS will show the stacktrace of whatever it compiled, though, so you can debug your AI easily even if you've got a mingw-built spring. addr2line doesn't understand any of it, unfortunately.
Re: VS2008 + AIs using the C++ Wrapper
I think some of you misunderstood me. I'm talking about stacktrace in infolog.txt with full featured function names. With PDB file it works (yeah, spring.exe was taken from original installation, not compiled by me). You just need to put it in spring.exe folder. The purpose is: getting useful AI crash logs from users when AI is compiled by MSVC.
Re: VS2008 + AIs using the C++ Wrapper
Thanks AF.
I had lots of troubles with cmake under windowz.
Did you use ".def" file to stop name mangling?
Re: VS2008 + AIs using the C++ Wrapper
ivand wrote:...Did you use ".def" file to stop name mangling?
http://darkstars.co.uk/2010/vs2008-ais-and-the-c-api/ wrote:I also corrected the dll exports issue with a .def file and setting the project to use stdcall calling conventions.
Re: VS2008 + AIs using the C++ Wrapper
I've updated the project file after noticing that if you do not already have a Minor/dev/ folder it will fail the custom build steps. I've added mkdir commands to fix this