Sign in to follow this  

3D Game Engine Programming Chapter 3 compile problem

This topic is 4205 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, Just wondering if anyone has this book and has managed to compile the code from the DVD for chapter 3? I've been to the website and read about having to compile the framework first to create the LIB and DLL files and then put them in the Demo folder. I've done that but when I try and compile (I use F5 debug through the application) all I get is:- ZFXEngine Error - Loading ZFXD3D.DLL From Lib Failed [OK] I then get the following debug error message from the IDE:- Run-Time Check Failure #3 - The variable 'msg' is being used without being defined. I'm using Microsoft Visual Studio C++ 2005.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
From a quick google i came up with this site:
http://stefan.zfx.info/3dgep.html

seems to be the bugfixes for the book and accompaying cd-rom here:
http://stefan.zfx.info/3dgep.html#lnk_02

hope that helps

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Same issues with VS2005 ... please check if your compiler settings if your're using a unicode application ore a multi-char app. Changing the encoding from unicode to multi-char fixed it.

Share this post


Link to post
Share on other sites
When trying to build ZFXd3D project only I am hit with the following error:-

.\dlgChangeDevice.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.

I think previously I ignored this and used the DLL manifest file created from building this in the Debug folder. I probably have to get this bit working first I think.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Ask the author directly through the forums of his website.

Share this post


Link to post
Share on other sites
I have that book. First, copy ZFXD3D.dll to the debug folder of the demo with the exe. For the variable 'msg', it's because when the program quit from the error, 'msg' will never get initialized. To fix this, instead of

return msg.lparam;

put

return 0;

Share this post


Link to post
Share on other sites
Hey,

I have managed to fix it, with a different approach but thanks for the post.

First of all when trying to compile ZFXD3D project I had a problem with the afxres.h include in the resource file. I have changed that to winresrc.h. I then encountered another problem with the res file, compiler saying IDC_STATIC was not defined. I added that in the resource.h, #define IDC_STATIC -1 and voila the thing loads.

Hopefully this post will help others using this book. I don't think it's a bad on the author though. I just think with the version changes etc things like this can happen.

Share this post


Link to post
Share on other sites

This topic is 4205 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this