   pre compiled headers and dx9
  In learning directx9 with c++ I have come across 2 type of programs. One with pre-compiled headers and one without.The samples in dx9 have mostly pre-compiled headers for DXUT. I can't stand precompiled headers to be honest, it is so much easier learning without this.q) I suppose there is no way to convert the precompiled header stuff so we can rid of it? Just a crazy thought.q) Do most standard dx9 programs contain DXUT and the precompiled header stuff?   
  Just disable the precompiled headers in your project settings. What compiler do you use?   ;Quote:Original post by Evil SteveJust disable the precompiled headers in your project settings. What compiler do you use?I am using vc++ express, the latest.NO my problem is not disabling them, it is trying to learn off programs that use DXUT precompiled headers which I find hard to follow, compared to lean and mean code.MOst dx9 samples use precompiled code, why? I hate this stuff as it slows me down, with lack of meaningful documentation.[Edited by - jagguy on June 12, 2006 9:49:06 PM];  I think I see where ot fits in now, and i don't like dxut for beginners MS can make things so complicated.   ;Quote:Original post by jagguyq) I suppose there is no way to convert the precompiled header stuff so we can rid of it? Just a crazy thought.q) Do most standard dx9 programs contain DXUT and the precompiled header stuff?1st A. If you really don't want pre-compiled header files then just follow evil steve's suggestion and switch them off. The header files will still be parsed by the compiler. You just won't have any of the benefits.2nd A. The only programs I know that use the DXUT are the samples that come with the SDK and also there was a book called Real Time Strategy Programming with DirectX 9.0 by WordWare publishing that uses it.I would recommend that you use pre-compiled headers as they will speed compilation times so much so that you will wonder why you never used them before (This is assuming that you have more than 1 .h file that includes a big header file)As a quick example:-------------------Not using PCH: If you have 10 .cpp files that each call on the windows API then  you are required to #include <windows.h> in all 10 .cpp files (The compiler will have to parse this file 10 times.Using PCH: The file would be parsed once and then referenced for the other 9 times. (This is where that infamous stdafx.h goes to work - you put all the big, most frequently used header files in here)Hope this helps;Quote:Original post by Adam HamiltonQuote:Original post by jagguyq) I suppose there is no way to convert the precompiled header stuff so we can rid of it? Just a crazy thought.q) Do most standard dx9 programs contain DXUT and the precompiled header stuff?1st A. If you really don't want pre-compiled header files then just follow evil steve's suggestion and switch them off. The header files will still be parsed by the compiler. You just won't have any of the benefits.2nd A. The only programs I know that use the DXUT are the samples that come with the SDK and also there was a book called Real Time Strategy Programming with DirectX 9.0 by WordWare publishing that uses it.I would recommend that you use pre-compiled headers as they will speed compilation times so much so that you will wonder why you never used them before (This is assuming that you have more than 1 .h file that includes a big header file)As a quick example:-------------------Not using PCH: If you have 10 .cpp files that each call on the windows API then  you are required to #include <windows.h> in all 10 .cpp files (The compiler will have to parse this file 10 times.Using PCH: The file would be parsed once and then referenced for the other 9 times. (This is where that infamous stdafx.h goes to work - you put all the big, most frequently used header files in here)Hope this helpsyou make a good point and I am happy to use pre-compiled headers for c++ code in theory. My problem was using DXUT which has precompiled headers for directx functions, it is a nightmare if you are learning directx. The is hopeless documentation around for DXUT .MS always make things harder than what the should be IMHO.