Jump to content
  • Advertisement
Sign in to follow this  
ynkm169

Tricks of the Windows Game Programming Gurus

This topic is 4094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi: I just bought the book and when I tried to execute .exe files in the CD for the samples in the second half of the book, I get a "Send Error Report" message every time. Anyone knows what's up? How can I fix this? I read comments on Amazon, and people have this kind of problem too.

Share this post


Link to post
Share on other sites
Advertisement
The book probably comes with code. Compile it yourself and then debug it. This should tell you where in the code the error is coming from and, if you can't fix it yourself, we'll be in a better position to help you.

Share this post


Link to post
Share on other sites
It's a horrible book by an author renowned for his poor coding style which also happens to be 5 years old (assuming you've got the 2nd edition)?

But yes, if you can get it built a debug error location will help.

Share this post


Link to post
Share on other sites
As is typical of game programming books especially for beginners there is little/no error checking in the code so it's not suprising the code is crash prone.
Having gone through the book myself a while back you will have to make changes to most of the code to get it to compile with newer compilers and SDK's.
Off the top of my head I remember having to plug memory leaks,pointer problems,etc in the code.
If you are looking for an updated CD with updated code there is no such thing but if you post the particular code you are having trouble with there are plenty of C/C++ programmers around here that can help you out.

Share this post


Link to post
Share on other sites
I just tried to compile the final example Outpost (I created win32.exe instead of console application), but I got 11 linker error like similar to these:


t3dlib1.obj : error LNK2019: VC doesn't recogonize this:_DirectDrawCreateEx@16,
this is referenced in the function:int __cdecl DDraw_Init(int,int,int,int)..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:_DirectInput8Create@20
this is referenced in the function:int __cdecl DInput_Init(void)..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:_c_dfDIKeyboard..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:_c_dfDIJoystick..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:__imp__mmioAscend@12..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:__imp__mmioRead@12..

t3dlib1.obj : error LNK2019: VC doesn't recogonize this:__imp__mmioOpenA@12..

Sorry I am not familiar with configuring the compiler and the linker.
The aurthor asks to put DirectX SDK.LIB directory and .H directory in the search path. So I put the following in the solution search path:

"C:\Program Files\Microsoft DirectX SDK (December 2006)\Lib\x64(Is this x84 or x64?)/LIBPATH:[C:\Program Files\Microsoft DirectX SDK (December 2006)\Include]"

I am not sure if it's because the search path name is wrong or some other reason.

By the way, I am using foreign version of Visual Studio 2003 (super cheap like 3 USD). Lots of pain when I try to translate for example linker and compiler and search path. lol...

[Edited by - ynkm169 on April 5, 2007 6:10:26 PM]

Share this post


Link to post
Share on other sites
Oh yeah I rember this program now.
If I remember correctly you'll need to compile against an older DX SDK since as you can see it's trying to link to some DirectX8 stuff which isn't in the latest DX9 SDK anymore.
Also you need to link windows multimedia library that's what the mmio stuff is about ie winmm.lib.
You can get it to work with latest SDK if you have been programming for a while and know your way around code and read the DX9 help files since I remeber doing it but it was quite painful ie need to change dx 8 calls to dx9,etc.
Easiest thing would be to just rewrite the code for DX9 in the first place since the book used DX8 since that's what was available at the time or use the SDK off the cd to compile the code.

Share this post


Link to post
Share on other sites
Ok, thanx for the help.
I will first try to add winmm.lib, and if it doesn't work I will try to install DirectX8 :(

Share this post


Link to post
Share on other sites
Quote:

By the way, I am using foreign version of Visual Studio 2003 (super cheap like 3 USD). Lots of pain when I try to translate for example linker and compiler and search path. lol...


Did you get it legally?

Share this post


Link to post
Share on other sites
Quote:
Did you get it legally?


I got the software illegally..well the local police rarely care, and everyone including university proffesors buy illegal copies. So I assume it's not illegal haha.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!