Jump to content
  • Advertisement
Sign in to follow this  
feverzsj

problem in comipling examples in Tricks Of The 3D Game Programming Gurus

This topic is 4355 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

i compiled some examples in chapter 7 of the book with my vc2005 compiler. but got a mass of errors such as "undeclared identifier" ,"cannot convert parameter"... i believe i've done right to the include files and lib files. any one can help me out?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If its using DirectX and you are using a newer version of the SDK than what the examples were written for there have been changes to stucture names and parameters
on many calls. (ie DirectX8 to Directx9....)

Share this post


Link to post
Share on other sites
The book is fairly old; it needs to be compiled with the version of the compiler and the version of the Microsoft headers / SDK that it was intentionally intended for.

However, updating a piece of code to work with a newer SDK is something that you should know if you know the programming language you're using. If the intent of the book is to teach 3D programming, then you should already be able to do general programming. If you need to first learn how to use your tools effectively, perhaps a tutorial aimed more at those kinds of things would be more appropriate.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
...it needs to be compiled with the version of the compiler and the version of the Microsoft headers / SDK that it was intentionally intended for.

As opposed to the versions it was unintentionally intended for? [smile]

@feverzsj:
Each error has an associated error code, and each error code has a corresponding entry page in MSDN that describes the error, common causes and fixes, with sample code. For each error you get, read the page and see what the problem is.

Each release of the DirectX SDK so far has included previous interfaces (this will not be the case for DirectX 10). In the case of Direct3D, for example, this is controlled by the D3D_SDK_VERSION symbol; set it to 0x0700 for Direct3D 7, which is what the book uses.

Of course, I'm presuming you've downloaded and installed the DirectX SDK. You have, right?

Share this post


Link to post
Share on other sites
yeah
i think that is the problem.
i use the latest dxsdk.
it would be a tough work to convert all to right.

[Edited by - feverzsj on August 20, 2006 4:09:42 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
Quote:
Original post by hplus0603
...it needs to be compiled with the version of the compiler and the version of the Microsoft headers / SDK that it was intentionally intended for.

As opposed to the versions it was unintentionally intended for? [smile]

@feverzsj:
Each error has an associated error code, and each error code has a corresponding entry page in MSDN that describes the error, common causes and fixes, with sample code. For each error you get, read the page and see what the problem is.

Each release of the DirectX SDK so far has included previous interfaces (this will not be the case for DirectX 10). In the case of Direct3D, for example, this is controlled by the D3D_SDK_VERSION symbol; set it to 0x0700 for Direct3D 7, which is what the book uses.

Of course, I'm presuming you've downloaded and installed the DirectX SDK. You have, right?


em...
just add the D3D_SDK_VERSION symbol to the top of theWinMain cpp file???

#define D3D_SDK_VERSION 0x0700
right???

and some identifier has to be renamed to what it is in the dxinput.h.

according to the errors reported
firstly, i use cast to convert char to LPCWSTR ,such as "(LPCWSTR)WINDOW_CLASS_NAME(LPCWSTR)WINDOW_TITLE,"

but it made the string turn into chaos.
then i realized that i am not using unicode, so i turn off the unicode set of compiler

finally
compiled successfully

another problem is
the originally example .exe file and my compiled exe file only show with half of the window ,another half is always black

[Edited by - feverzsj on August 20, 2006 7:27:27 AM]

Share this post


Link to post
Share on other sites
"
can not find these functions," mmioAscend mmioRead mmioClose mmioDescend mmioOpen" ,the linker gave the errors.
so i temporarily removed these functions from cpp files.
"
You probably didn't link with the windows multimedia dll that's why you are getting above errors.
I have this book and I got the code to compile with a directx sdk from about a year ago so it shouldn't be too hard to do.
Also you might want to try Andre Lamothe's website since he probably already answered alot of questions like your on his message boards.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!