Please save my sanity with Visual Studio 8

Please save my sanity with Visual Studio 8

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Please save my sanity with Visual Studio 8

Post by Acidd_UK »

I'm very interested in AI development and I've been meaning to have a play with it for a while now. I've downloaded the full 0.72b1 source tree and I'm trying to compile the test group AI as a sanity check. I used the test ai project file to open the project.

I would like to say at this point that all my development experience has been under linux, using homemade make files etc. Visual Studio is very confusing to me.

Ok, so I try to compile the test AI and it gives me a ton of errros about not being able to find the header files. So my first question is, where do you set the include paths? The test AI project file seems to use
taspring_0.72b1\AI\Global\TestGlobalAI
as the working directory, but then references files like
#include "IGlobalAI.h"
I have to change this to
#include "../../../rts/ExternalAI/IGlobalAI.h"
but I assume there's an esier way to do this...

So anyway, as an intermediate hack, I altered all the relevant paths ib trhe test ai source so that VS can find them. However, I'm now getting a compile issue that I simply don't understand:
taspring_0.72b1\ai\global\testglobalai\testai.cpp(10) : error C2065: 'GLOBAL_AI_INTERFACE_VERSION' : undeclared identifier

That seems simple enough, except that testai.cpp references GlobalAI.h which in turn references IGlobalAI.h which defines GLOBAL_AI_INTERFACE_VERSION 15. VS isn't moaning about not beinh able to find the header files, so why is it telling me that GLOBAL_AI_INTERFACE_VERSION is undefined, when it looks to me like it is? Not knowing much about VS, I've been tryimng to figure this out for about 30 mins and now I want to burn down the microsoft offices. As such, I'm going to stop until someone can help :-)

Edit: It also maons about AI_NAME which is defined in GlobalAI.h. GlobalAI.h is directly included by testai.cpp and it can't find that either.. wtfhelpme!

Cheers for help/guidance etc.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

its beign labeleld as udnefined because you need to include iglobalai.h which you havent.

Take the NTai/JCAI/Test ai and directly modify the code, make sure all the folders are setup as they where in the source dir aswell.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: Please save my sanity with Visual Studio 8

Post by Acidd_UK »

But I think it is included:
Acidd_UK wrote:<snip>That seems simple enough, except that testai.cpp references GlobalAI.h which in turn references IGlobalAI.h which defines GLOBAL_AI_INTERFACE_VERSION 15.
So it's indirectly included through GlobalAI.h as far as I can tell and certainly the compiler doesn't moan about not being able to find those headers... Please can you explain to me why you don't think it's being included - I'm not saying you're wrong but I want to know why it's behaving that way...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I don't know, simply opening and creating a new VS project file based on the VS 7 project should work.

Try building NTai or JCAI
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Will give it a go later or tomorrow and let you know how it goes - thx for the help...
Post Reply

Return to “Engine”