12 Replies - 1231 Views - Last Post: 02 October 2011 - 11:33 AM
#1
Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 04:54 AM
I'm getting this error when trying to compile a code related to DirectSound. I'm using VS 2010 Express along with DirectX SDK from June, 2010.
My guess is that there were some changes to this, as I already had to change dxerr9 to dxerr.
How can I fix this error?
Replies To: Cannot open include file: 'dxstdafx.h': No such file or direct
#2
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:06 AM
#3
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:11 AM
#4
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:24 AM
Adak, on 02 October 2011 - 01:06 PM, said:
dxstdafx.h is not a standard C++ include file however. Judging by the OP, it sounds like it belongs to the DirectX SDK
#5
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:27 AM
I guess the file either was renamed or merged in the newer Dx version, however I was unable to find any information about it...
#6
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:37 AM
newn, on 02 October 2011 - 01:11 PM, said:
If you're 100% certain that the missing, and the documentation you've got says that file should exist, then that suggests either something went wrong during installing it (or perhaps you missed out a step?), or maybe that you're using a different version of the SDK compared to the one which goes with the documentation
newn, on 02 October 2011 - 01:27 PM, said:
I guess the file either was renamed or merged in the newer Dx version, however I was unable to find any information about it...
That could explain it. I have no idea what version of DirectX existed in 2007 (And perhaps the tutorials weren't even for the latest version at the time? Maybe it'll tell you what version it had been written for).
I expect the easiest thing for you to do will be to either use the SDK version which matches the tutorials, or find a tutorial for the newer version; SDKs do have a habit of changing between software versions (it's not uncommon to pick up a new SDK for something and find that its incompatible with the older version) - You might find that there are other changes in the latest version which causes problems following the older tutorial.
#7
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 05:48 AM
Bench, on 02 October 2011 - 03:37 PM, said:
I expect the easiest thing for you to do will be to either use the SDK version which matches the tutorials, or find a tutorial for the newer version; SDKs do have a habit of changing between software versions (it's not uncommon to pick up a new SDK for something and find that its incompatible with the older version) - You might find that there are other changes in the latest version which causes problems following the older tutorial.
There is a big problem in finding newer tutorials, especially for a whole game engine. That was the newest I could find, so I took it. I also don't really want to use an older Dx version - it's out-dated. Using outdated stuff usually leads to misuse of newer code and other problems, that's why I always try to stay up-to-date.
Learning parts and then putting everything together when it's not explained well... Well, it's not something I can do, nor most beginners in this section could do, I believe.
Although, if you could point me to some tutorials for this matter (without the use of any external libraries, like Allegro (which I absolutely hate, by the way)), it would be awesome, but I haven't found anything newer in two hours of surfing when I was looking for a reference on this matter.
---
As for other problems - everything seems to be working fine. Only input and tile-scrolling is left for me to go trough, and I doubt anything is changed in these as I skimped trough the code a few minutes ago. Input might have a problem, but not likely, as it haven't changed since Dx8 according to the author, so it's not likely that suddenly something would be changed in July of 2010 either... At least that's my opinion and understanding of this whole matter.
This post has been edited by newn: 02 October 2011 - 05:51 AM
#8
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 07:11 AM
newn, on 02 October 2011 - 01:48 PM, said:
If you're working with the codebase of an existing Game Engine, then you might not have any choice if the game engine you're using does not support the latest SDK (I suspect that it doesn't if you're getting trouble compiling it). I also suspect that if you do get it compiling, then you might get other "weird" problems when its actually running, because there may be other incompatibilities that the compiler doesn't pick up (And these will probably be hard to diagnose and fix).
Also, regardless of the version you actually run on your system, remember that your tutorial was written in 2007 - so whatever it's teaching you will be the techniques which were (hopefully) correct for 2007, so you're unlikely to be learning anything newer anyway.
newn, on 02 October 2011 - 01:48 PM, said:
On a related note, If this is just a DirectX problem and not related with getting a game engine to work, then the Microsoft Community boards might be a good place to ask for tutorials
This post has been edited by Bench: 02 October 2011 - 07:18 AM
#9
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 07:21 AM
The graphics API has also changed. Direct3D has significantly changed from D3D 9 to 10+. The FFP has been utterly dropped, so there's a massive divide between the two. Direct2D and DirectWrite have been introduced in recent SDK versions.
#10
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 07:32 AM
By the way, I'm not going into 3D, I'm going for 2D, for now.
#11
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 07:39 AM
2D is 3D without using the third dimension. You'll be using ortho projections, but otherwise, you have similar concerns. It does simplify the math significantly, but you still have to learn to deal with some of the more fundamental concepts.
Also, still have to do 2D transforms, so you still have to be able to setup the rotation, translation, etc. matrices.
#12
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 07:50 AM
Been looking for tutorials again (and still am, in fact), although most of them goes for SDL... I really can't believe there aren't any tutorials available on this subject.
---
Currently I've read and and completely understood how to display moving sprites, how to use input and collision with DirectX.
I have completely no understanding about tilemaps and sounds at the moment, as the tile-system seems to have some problems too (the program runs fine after I remove the sound-related code, so I was able to test it).
#13
Re: Cannot open include file: 'dxstdafx.h': No such file or direct
Posted 02 October 2011 - 11:33 AM
You are right there doesn't appear to be much on DirectSound.
|
|

New Topic/Question
Reply




MultiQuote





|