Page 1 of 1 |
|
Posted: Tue, 15th Jan 2013 16:36 Post subject: ask for help pls |
|
 |
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
|
|
Back to top |
|
 |
[mrt]
[Admin] Code Monkey
Posts: 1338
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
|
Posted: Tue, 15th Jan 2013 17:05 Post subject: |
|
 |
thank you for your reply!
so I cant make any easy changes in code to run it with current directx sdk?
I have some experience with C\C++ but never worked with directx so I don't know what tot touch and if its possible at all to make such changes to code?
|
|
Back to top |
|
 |
|
Posted: Tue, 15th Jan 2013 17:06 Post subject: |
|
 |
Maybe as a starter you should look for something more robust and easy to start "game development"?
Ever looked at XNA and C#?
|
|
Back to top |
|
 |
Frant
King's Bounty
Posts: 24433
Location: Your Mom
|
Posted: Tue, 15th Jan 2013 17:08 Post subject: |
|
 |
C# is an excellent language to "start" in or even stay with. Obviously it's not optimal if you're planning on doing a huge game where performance is an issue but since it's managed you don't have to care about garbage collection and headers and stuff. Removes the tedious and messy stuff from programming.
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!
"Thank you to God for making me an Atheist" - Ricky Gervais
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
|
Posted: Tue, 15th Jan 2013 17:13 Post subject: |
|
 |
Well, C# and XNA are really easy to get in to. And as frant said, managed languages are really good for beginners and especially with the help of the XNA framework you'll start with the actual developing much faster 
|
|
Back to top |
|
 |
Frant
King's Bounty
Posts: 24433
Location: Your Mom
|
|
Back to top |
|
 |
|
Posted: Tue, 15th Jan 2013 17:24 Post subject: |
|
 |
Doing something like C# with XNA or Unity will certainly allow you to create a game much quicker, but building it from ground up with DirectX and C++ will give you a great insight of the inner workings of it all.
If you're already familiar with C++ I suggest you stick with it. Once you understand the low level workings of C++, it's easy to figure out C#.
Also most of the "heavy stuff" is done in C++, and majority of the literature uses it. In short, if you ever plan on going pro with game development you will most definitely need C++, so you can't go wrong with it.
----
To answer your question, there is no easy way do switch from direct draw to a newer method.
I can suggest you read:
Introduction to 3D Game Programming with Directx 11
And once you're familiar with the basics:
Practical Rendering and Computation with Direct3D 11
DirectX 9 is out of the door, and it uses so many obsolete techniques that you're gonna waste a lot of your time learning stuff that is no longer used. DirectX 11 is the way to go. Possibly OpenGL but OpenGL is missing a lot of DX11 features and in general DX11 is very nicely designed and easy to understand, yet powerful.
|
|
Back to top |
|
 |
|
|
Back to top |
|
 |
|
Posted: Tue, 15th Jan 2013 20:38 Post subject: |
|
 |
Add a path to whatever folder the ddraw.lib is located in. With newer SDK the library folder is usually sdkpath/Lib/x86
(Replace x86 with x64 if building 64bit)
So for example (on my PC):
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86
|
|
Back to top |
|
 |
Page 1 of 1 |
All times are GMT + 1 Hour |