Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linker error when using DirectDraw 1

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Hallo. I'm just trying to learn DirectDraw, but am having something of a problem from the outset with the linker.
But first, what I have got, to eliminate that.
I have got "ddraw.dll" and "dsound.dll" in the correct place (I haven't monkeyed with them, as they were already there).
I have #included <ddraw.h> at the top of my form.
I have an LPDIRECTDRAW called lpDD.
I have an HRESULT called retval.

My problem is, when I try to call DirectDrawCreate in my form (on a button click), I get an unresolved external linker error.

Anybody got any hints as to what to do with this?
Douglas JL

Common sense is what tells you the world is flat.
 
hi Douglas,

You probably need to add a lib file to your project.
I have no experience with DD but I guess you need one of the libs that came with the sdk.

 
I'm afraid I have no exerience with either DD or libs and sdk - (&quot;something developers' kit, maybe?).
Is this something fairly general I might be able to try to apply to DD?

Cheers,
Douglas JL
Common sense is what tells you the world is flat.
 
That was it!
I found a ddraw.lib & added it to the project.
Thanks lot, hennep! Common sense is what tells you the world is flat.
 
I had the same problem than you some months ago, and I solved, just let me remember and be sure that I'll tell you what to do
 
I don't know what have you done, but her there are some tips:

1.-Into the project file (default name is &quot;project1.cpp&quot;)
add this :#pragma link &quot;ddraw.lib&quot;
2.- Add this library into your project (shift + F11)
3.- In the example's files you can see what you should do
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top