Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

xDS4Lx

Stdafx.h?

This topic is 6016 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I just download this program that required stdafx.h but I cant find it anywhere. Is it not a regular include? If so where can I find it?

Share this post


Link to post
Share on other sites
Advertisement
Stdafx.h is the name of the precompiled header file that MSVC uses. It pulls in all the header files that every file in the project needs access to, so if you have some fairly global headers that will hardly ever change then put them into the PCH too.

The MSVC-generated PCH also does some GUID-twiddling nonsense (someone once asked whether Microsoft programmers named their kids with GUIDs!) and establishes some defines. One thing to keep in mind is that the PCH include directive must come before any and everything else in every source file in your project. Every single one.

Other than that, take a look at what MSDN has to say.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
Is there any way I can get MSVC to include pre-compiled headers if Ive already started my project? Like a button i can press/check? And if so will it automatically generate the Stdafx.h for my project?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!