getting started

Use this board to ask specific questions about the DirectX 10 book, or specific problems you are having with it (e.g. problems understanding a section or source code). If relevant, include the chapter, page number, sample program name, or a brief code snippet.

getting started

Postby Joe on Sun Feb 28, 2010 2:59 pm

Hello,
I am new to the DirectX 10 Book. I have downloaded and installed DirectX 10 as well as the source code for the book. I have used VisStudio 2005 quite a lot previously to build Win32 apps so I am not a newbie in that regard.
I have followed the instructions for setting up the project in VS2005 but am having trouble building. I am getting 68 odd errors about things like
1>d3dApp.cpp
1>c:\program files\microsoft visual studio 8\vc\include\stdlib.h(488) : error C2059: syntax error : 'constant'

I'm sure there is something simple that I haven't set in VS2005 but not sure what it is. BTW, even though the pathname indicates vis studio 8, I really am running 2005. Not sure why it installed to that directory.
Any help is appreciated.
Thanks,
Joe
Joe
 
Posts: 5
Joined: Sun Feb 28, 2010 2:49 pm

Re: getting started

Postby Joe on Mon Mar 01, 2010 5:25 am

Since a wrote yesterday, I've tried a few things like building a project from scratch to do a "hi there" console program. That builds just fine. I note that another person on the forum was having a similar problem with stdlib.h when attempting to build the chap4 demos.
It's curious because there are no references to stdlib.h in the InitDirect3D project unless one of the other h files includes it.
It's a puzzle.
Joe
Joe
 
Posts: 5
Joined: Sun Feb 28, 2010 2:49 pm

Re: getting started

Postby Joe on Mon Mar 01, 2010 8:29 am

Maybe I'm going to answer my own question. It's probably a little bit of stupidity on my part, but it would be good if someone who knows could verify. I figured that the problem was some sort of version or define thing. So I built a Windows Win32 program that included stdafx.h and stdafx.cpp and then built that to ensure the basics were working. Then I copied those two files into my InitDirect3D project for chapter 4 and it built without error. So one of the defines in the stdafx.h did the trick. BUT, when I tried to run it could not locate d3d10.dll.
Now, here's the stupid part, I think. I know that DirectX 10 is intended for Win7 but I thought I'd try it on XP pro. That is probably the biggest problem, yes? I downloaded the latest and greatest DirectX SDK (Feb) and installed it. There's a lot of DirectX 9 stuff there and a few DirectX 10 things as well as DirectX 11 things.
Should I back up and either get the DirectX 9 book if I want to stay in XP, or should I bite the bullet and get Win7?
Thanks,
Joe
Joe
 
Posts: 5
Joined: Sun Feb 28, 2010 2:49 pm

Re: getting started

Postby Hieran_Del8 on Mon Mar 01, 2010 9:07 pm

Joe wrote:getting 68 odd errors

I'm sorry you're having trouble. You did try to compile a simple win32 c++ application project that was created "empty"?
Joe wrote:the pathname indicates vis studio 8

That is the product number, just as Visual Studio 2008 is the same as Visual Studio 9.0.
Joe wrote:no references to stdlib.h in the InitDirect3D project unless one of the other h files includes it.

stdlib.h is one of the core c runtime headers, so many headers depend on it. It provides functions like _itoa(), _atoflt(), bsearch(), qsort(), and others that are familiar.
Joe wrote:I figured that the problem was some sort of version or define thing. So I built a Windows Win32 program that included stdafx.h and stdafx.cpp and then built that to ensure the basics were working. Then I copied those two files into my InitDirect3D project for chapter 4 and it built without error. So one of the defines in the stdafx.h did the trick.

I can't say I know what's going on, sorry.
Joe wrote:when I tried to run it could not locate d3d10.dll.
Now, here's the stupid part, I think. I know that DirectX 10 is intended for Win7 but I thought I'd try it on XP pro. That is probably the biggest problem, yes? I downloaded the latest and greatest DirectX SDK (Feb) and installed it. There's a lot of DirectX 9 stuff there and a few DirectX 10 things as well as DirectX 11 things.
Should I back up and either get the DirectX 9 book if I want to stay in XP, or should I bite the bullet and get Win7?

XP will not install the directx 10 runtime dll's because they rely on the new windows driver model, present in vista and win7. It's also interesting to note that the Feb2010 directx release no longer supports visual studio 2005 and before, though 2008 and 2010 are supported.

If you want to program for xp, then the directx 9 book will be great. Win7 and directx 11/10.x is great, though it's sometimes a pain in the apps when trying to run old games. (Like having to use a non-aero theme and leaving the "Screen Resolution" window open so Starcraft's colors look right. The disabling of aero-driven themes I can kind of understand, but leaving the "Screen Resolution" window open?!)

But just wait until tessellation becomes standard, the functionality demonstrated in this dx11 benchmark:
http://www.unigine.com/press-releases/091022-heaven_benchmark/
Hieran_Del8
 
Posts: 203
Joined: Fri Oct 03, 2008 12:18 pm
Location: Marengo, IL

Re: getting started

Postby Joe on Tue Mar 02, 2010 7:51 am

Thank you very much for the response. It confirmed my suspicions and added additional info about the Feb release not supporting 2005.
Since a good deal of my work supports many people using XP, I guess I'll stick with that and go for DirectX 9. I got started down this road to DirectX 10 because of an article in MSDN mag about DirextX 2D.
I have been doing lots of programming for audio and very simple 2D graphs by using the old multimedia API and drawing to a virtual bitmap and then bitbliting to the screen. Yes, I am back in the dark ages. I had tried earlier versions of DirectX for audio and had not been impressed. So now I thought I'd try again.

Biggest difficulty I see is that most of the people I share code with won't want to move to 2008, but we'll see.
Thanks again for the help.
Joe
Joe
 
Posts: 5
Joined: Sun Feb 28, 2010 2:49 pm

Re: getting started

Postby Hieran_Del8 on Tue Mar 02, 2010 10:09 am

Joe wrote:I have been doing lots of programming for audio and very simple 2D graphs by using the old multimedia API and drawing to a virtual bitmap and then bitbliting to the screen. Yes, I am back in the dark ages. I had tried earlier versions of DirectX for audio and had not been impressed. So now I thought I'd try again.

Interesting. What kind of audio programming have you done? Audio processing objects (APO), filter graphs, soundcard programming?
Joe wrote:Biggest difficulty I see is that most of the people I share code with won't want to move to 2008

Well, the express editions are free, but if it's an issue, you could always use a previous release of the sdk.
Hieran_Del8
 
Posts: 203
Joined: Fri Oct 03, 2008 12:18 pm
Location: Marengo, IL

Re: getting started

Postby Joe on Thu Mar 04, 2010 4:54 am

Mostly the audio work I've been doing is analysis using FFT's and Wavelets and displaying the results on the screen. Now that I've left the company where I did that, I'm free to explore other areas of audio interest that I couldn't do there. My wife and I are musicians so I've got some musical apps in mind.
I am really trying to get my mind wrapped around the latency issue and the fact that Windows is not a real time op system. Seems as though there is a LOT more written material about graphics than there is sound. Wonder if there are any forums on audio in Windows?
Joe
Joe
 
Posts: 5
Joined: Sun Feb 28, 2010 2:49 pm


Return to DirectX 10 Book

Who is online

Users browsing this forum: No registered users and 1 guest

cron