So i bought this book, "Programming Game AI by Example". Read about the first 2-3 chapters then finally had a chance to sit down and play with the source code. They examples are meant for Visual C++ 6.0 or 8.0, I have Visual C++ 2008 Express edition but I've never really used it for anything because it seems so confusing, I've been happy just using Dev-C++.
So anyway, I can't get it to compile even though I've done everything he said to do.
1 2 3
|
I get 4 errors, they all look pretty much the same, like this.
error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'const std::list<_Ty>::_Iterator<_Secure_validation>' (or there is no acceptable conversion)
|
This problem I "fixed" by commenting out an assert() for the time being. I'm just trying to get the damn thing to work now.
Now I have another problem: fatal error RC1015: cannot open include file 'afxres.h'.
What that is, I don't know. It's in Script1.rc which is labeled with
//Microsoft Developer Studio generated resource script.
You can download the source code for yourself if you wish at www.wordware.com/files/ai
In the back of the book he says to do this in order to compile the code.
1. Download the zip file with the source code (up there ^) (for example C:\AI Source)
2. Download and install the Boost library headers. (which i did) (for example C:\boost_1_31_0.)
3. Add the following paths to the general settings of your compiler in your development enviroment.
Include file paths
- C:\boost_1_31_0
- C:\AI Source\Common
- C:\AI Source|Common|lua-5.0\include
- C:\AI Source\Common\luabind
Source file paths
- C:\AI Source\Common
- C:\AI Source\Common\lua-5.0
- C:\AI Source\Common\luabind
Library file paths
- C:\AI Source\Common\lua-5.0\lib
I'm not proficient at all with Visual Studio, so I'm sorry if whatever the problem is, is trivial. Thanks for your help.