DWORD

I'm weaseling out of including windows.h, since it's so massive, and I was wondering: is DWORD always unsigned long for versions of Windows? MSDN doesn't mention any difference, it only says it's unsigned long.

On a related note, any advice on how to speed up compilation, such as headers to look out for? It just takes to damn long.
it's all the other header files that are included from windows.h in particular:

winuser.h, wingdi.h and winbase.h - these are 200k+ each.

if you only want the DWORD definition you can try just including windef.h
You could use precomplied headers to improve build time.
That would only help on one platform.
Doesn't g++ support precompiled headers? I thought it did.
Uh... I'll have to check that.
Well, I have no problems generating the PCH, but I have no idea whether GCC is using it. Supposedly, it is, but there's no discernible difference in speed.
1) How big is the project?
2) How long is too damn long?
How many .c/.cpp files do you have.
20k lines, 37 sources, 38 headers (not counting external headers). The largest source (3.7 MiB) is a conversion table and one of the fastest to compile. The second largest one (152.7 KiB) and the one that takes the longest to compile is the interpreter code. It takes 10-20 seconds on a virtual machine, and less than 5 seconds in native. I know, it's not that long, but I'm impatient.
I tested PCHs on this one by itself. There was no difference.
How are you using the PCH? Are you using the same PCH first in all the relevant cpp files? If you're not, the compiler has to discard it and recompile it each time.
When I tested it, I did this: I moved one file and its headers outside of the directory structure, I took out all its includes, and moved them to a new header, which I included in the file. I compiled this header, which produced the PCH, and then I tried compiling the .cpp. I compiled it again after deleting the PCH and there was no difference.
Topic archived. No new replies allowed.