Skip to main content
gamedev.net
🔒 Locked

Need help with Game Coding Complete, Third Edition Source Code

Started by striker87 Jun 12, 2010 at 1:26 PM 12 replies 4.9k views
Original Post
striker87
striker87
I hope this is the right forum for this. If not I apologize. I have been trying for a week to get the source code for the book to build and run correctly so wondering if there is anyone on these forums who has looked at the code and has got it working with Visual Studio 2008 but would like it to work with Visual Studio 2010 if at all possible. It's just been driving me up the wall as the instructions to set it up doesn't tell you everything to get it working. Also could I get a link to download the working code as I would greatly appreciate it.
ExcessNeo
ExcessNeo
You need to provide more information for anybody to help you.

What specifically can't you do? What errors are you having when you try to compile.
striker87
striker87
Such as what files to include in the directories and any other configurations. Right now I'm getting these two errors and not sure what I did to get them as before it was able to build but crash when running.


Error 1 fatal error LNK1104: cannot open file 'libbulletdynamics_d.lib' TeapotWars TeapotWars
Error 2 fatal error LNK1181: cannot open input file 'libbulletdynamics_d.lib' Editor Editor

Just wish the third party folder was included in the source code instead of seperate with all the directories included and any other configurations so the code would build from the start or atleast much clearer and detailed instructions.
ExcessNeo
ExcessNeo
Well one key difference between 2008 and 2010, is the directories of include and libraries is handled on a per project basis so you may need to open the project properties by right clicking go to VC++ Directories and edit the include and library directories to add the folder that the bullet dynamics library is contained.
striker87
striker87
I'm doing in 2008 for now and got rid of those two errors but now get these:


Error 9 error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z) gamecode3d.lib Editor
Error 10 error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z) gamecode3d.lib Editor
Error 11 error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize@btConvexInternalShape@@UBEPBDPAXPAVbtSerializer@@@Z) gamecode3d.lib Editor
Error 12 fatal error LNK1120: 3 unresolved externals c:\Users\David\Desktop\GameCode3\Test\Editord.dll 1 Editor
Error 13 error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z) gamecode3d.lib TeapotWars
Error 14 error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z) gamecode3d.lib TeapotWars
Error 15 error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize@btConvexInternalShape@@UBEPBDPAXPAVbtSerializer@@@Z) gamecode3d.lib TeapotWars
Error 16 fatal error LNK1120: 3 unresolved externals ..\..\Test/TeapotWarsd.exe TeapotWars
ExcessNeo
ExcessNeo
Without seeing the source code itself it would be impossible to know where that stems from. Is that the complete error as that I believe is an initializing error.

Are you linking your debug build to debug libraries and your release build to non debug libraries?
striker87
striker87
I redownloaded and started over. Right now I'm getting over 3000 errors. This is the first one which I see repeated in the list of errors:


Error 3 error C2061: syntax error : identifier 'LuaObject' c:\users\david\desktop\new folder\gamecode3\source\actors.h 128 GameCode3

Also the source code can be downloaded for free. Here are the links for what you need if interested in trying yourself:

http://code.google.com/p/gamecode3/downloads/list

http://www.delmarlearning.com/companions/content/1584506806/source_code/index.asp?isbn=1584506806
ExcessNeo
ExcessNeo
I grabbed the files, put it all together got all the directories correctly included and just...

I really do not know what is wrong with it nor do I unfortunately have the patience on a Saturday evening to really go through it (I wouldn't even know where to begin to be quite frank).

My suggestion is to try and contact the author.
striker87
striker87
Now I get an error saying I don't have LuaPlusD_1100.dll. According to the directions it says to set "Working Directory" to "..\..\Bin" which gets rid of that error about LuaPlusD but it crashes saying The application was unable to start correctly (0xc0150002). Click OK to close the application.
Mysterion
Mysterion
I've got my project working with vs2010. But, I can't get the editor to run without crashing.

I'll upload the project if you want it.
striker87
striker87
I would greatly appreciate it if you could.
Mysterion
Mysterion
Here's the link, I had to change a bunch of things in the source code, so I included everything needed.

http://dl.dropbox.com/u/3116362/gamecode3.zip
striker87
striker87
Thanks I appreciate it and downloading it now.
striker87
striker87
Just have a few questions. First is the DX10 folder suppose to have everything the project needs that deals with DirectX? Asking because it couldn't find a header file so I included the directories to the DirectX I have on my computer which is this months release to get rid of that error and had to change dxerr9.h to dxerr.h in one of the files.

Second is the reason you couldn't get the Editor to work because of these errors:


Error 1 error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
Error 2 error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string,class std::allocator >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z) C:\Users\David\Desktop\New folder (2)\gamecode3\Source\Editor\libboost_thread-vc90-mt-s-1_37.lib(thread.obj) Editor
Error 3 error LNK1120: 2 unresolved externals C:\Users\David\Desktop\New folder (2)\gamecode3\Bin\Editor.dll 1 1 Editor


Third did you get this popup when closing Teapotwars:

The Direct3D device has a non-zero reference count, meaning some objects were not released.

Besides that great work and thank you for taking the time to getting it to work. If you happen to be able to get the Editor working and/or whats causing the popup please let me know. Again thank you for your help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.