开发者

Why does Visual Studio 2010 create precompiled header files even if I don't ask for it?

I have Visual Studio 2010 with SP1 installed. I want to 开发者_开发技巧create a simple Win32 console application in C++.

I click New Project \ Win32 Console Application

There I click Console Application, no for "Empty project", no for "Precompiled header", no for "ATL" and "MFC".

The wizard looks like this:

Why does Visual Studio 2010 create precompiled header files even if I don't ask for it?

Now, if I click finish, I end up with a project like this:

Why does Visual Studio 2010 create precompiled header files even if I don't ask for it?

But why? I don't want precompiled headers, all I want is a very basic Win32 console application to practise learning C++.


They're not precompiled header files unless they are compiled with the appropriate compiler flags(Yc to create the pch, and Yu to use it). If you check the Precompiled Header checkbox, those flags are set by default on all files added to the project. If you don't check it, they are not.

If you don't want any files generated, check Empty project.


Those headers aren't pre-compiled, they're pre-generated. Pre-compiled headers have the .pch extension and are pre-compiled versions of your own user headers. If you don't want them, then you need to click "Empty Project".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜