Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

need help with old code and today software

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 romul_0001   Members   

102
Like
0Likes
Like

Posted 15 January 2013 - 09:51 AM


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:

Attached Files


Edited by romul_0001, 15 January 2013 - 09:51 AM.


#2 HAM   Members   

176
Like
0Likes
Like

Posted 15 January 2013 - 12:29 PM

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

#3 Burnt_Fyr   Members   

1664
Like
0Likes
Like

Posted 15 January 2013 - 02:22 PM

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






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.