• Advertisement

Archived

This topic is now archived and is closed to further replies.

Tricks of the Windows Game Programming Gurus

This topic is 5415 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've got a prob and was hoping one of ya'll would help me out I created a new project, included the DirectX libs, includes, and headers, and I tried to compile the third program in Chapter 6 ... it didn't work. Here's the error it gave me: demo6_3.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4 Debug/directx.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Do any of ya know how to fix this problem? [edited by - zer0wolf on April 30, 2003 1:42:26 AM]

Share this post


Link to post
Share on other sites
Advertisement
Did you create a win32 application or a win32 console application?

Share this post


Link to post
Share on other sites
Star2-

no... I just lifted the code right off of the CD that came with the book, but I don't see that anywhere in the code.

[edited by - zer0wolf on April 30, 2003 2:38:55 AM]

Share this post


Link to post
Share on other sites
flukus-

the only DirectX lib it used is ddraw.lib, and I did add that one, at the beginning of the list

Share this post


Link to post
Share on other sites
Did u try to add it and see if it works?

EDIT: talking about the define (#define INITGUID)

[edited by - Star2 on April 30, 2003 2:43:29 AM]

Share this post


Link to post
Share on other sites
Thats strange, In my code the top is:


  
// DEMO6_3.CPP basic full-screen pixel plotting DirectDraw demo


// INCLUDES ///////////////////////////////////////////////


#define WIN32_LEAN_AND_MEAN // just say no to MFC


#define INITGUID // make sure directX guids are included


#include <windows.h> // include important windows stuff
#include <windowsx.h>


didnt include the whole source, just the top part..
And if I remove the #define INITGUID
I get that error but with _IID_IDirectDraw7 (because it uses DirectDraw 7)
I got TOTWGPG Second Edition..

Share this post


Link to post
Share on other sites
I've got the first edition... the code isn't quite the same apparently...

awesome... adding that code plus adding dxguid.lib makes it work! That must have been a code error that he fixed between both of the books.

Thanks Star2!

[edited by - zer0wolf on April 30, 2003 2:55:28 AM]

Share this post


Link to post
Share on other sites
Glad u got it fixed..

Strange tho, I never needed to add dxguid.lib to the Link list.
Only ddraw.lib and it built without errors, even ran fine.

EDIT: I use Microsoft Visual C++ 6 Introductory Edition
that follows with the book.

[edited by - Star2 on April 30, 2003 2:57:40 AM]

Share this post


Link to post
Share on other sites
I''m using VIsual Studio 6.0 professional, and I''ve downloaded the service packs. oh well... I''m just glad it works now

Share this post


Link to post
Share on other sites
Remember when your reading that book that andre likes to explain things in order of hardest to easiest, almost like hes justifying the use of direct x. So read a whole chapter befor trying out any of the stuff.

Share this post


Link to post
Share on other sites
Srry to harase you but would C++ Compiler Plus be as good as Advance C++ if not what is the site for Advance C++.

Share this post


Link to post
Share on other sites
zer0wolf

Is it " Tricks ..." edition 1 ?
Are you using direct x 7.0 or 8.0 ?
I had the same error message " ...unresolved..."
Despite the COM technology some demos work with direct x 6.0 only.
I wrote to Andrè and he fixed the problem.
It was a long time ago so I do not remember the details

Share this post


Link to post
Share on other sites
Unfortunately, that is not the first code error / tutorial omission that LaMothe makes, from what I remember All in all though, it''s a great book, despite this.

Share this post


Link to post
Share on other sites

  • Advertisement