Jump to content
  • Advertisement
Sign in to follow this  
romul_0001

need help with old code and today software

This topic is 2077 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 there!
im total newbe and have a problem.iv got Andre Lamothe book "tricks of windows game programming gurus" and when im compiling first example in this book ive got errors:

Warning 1 warning C4101: 'ps' : unreferenced local variable
Warning 2 warning C4101: 'hdc' : unreferenced local variable
Error 4 error LNK2019: unresolved external symbol _DirectDrawCreateEx@16 referenced in function "int __cdecl DD_Init(int,int,int)" (?DD_Init@@YAHHHH@Z)
Error 5 error LNK1120: 1 unresolved externals

and some more.but if go to project properties and change character set from Unicode to multibyte I end with errors 4 and 5 only.

now the book is from 2002 so the .cpp files and Im using visual studio 2012 express with windows 8 with directx sdk that comes with it.
I don't see ddraw.lib in sdk folder and don't know what to do and how to resolve the errors above
any help please will be appreciated
thank you

 

source files:

Edited by romul_0001

Share this post


Link to post
Share on other sites
Advertisement
The warnings don't really matter.

The errors are link errors. If you look at the documents page for DirectDrawCreatEx you'll find what lib you need: http://msdn.microsoft.com/en-us/library/windows/desktop/gg426116(v=vs.85).aspx

Then in the project settings, linker section, make sure you are linking to that lib.

However, I honestly don't even know if DirectDraw functions are still part of directX sdk. That is pretty old stuff. But I suppose it would still be in the libs for directX 9.c

Share this post


Link to post
Share on other sites

AFAIK Direct Draw was depreciated in dx8, and removed altogether from dx9(someone with better knowledge can correct my timeframes). You will either need to procure an older SDK, or attempt to port the code to a different api, such as the more modern dx11

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!