You can make your own template for this, or you can change it by default. The corresponding wizard can be found here:
C:\Program Files\Microsoft Visual Studio 9.0\VC\VCWizards\AppWiz\Generic\Application
Obviously, if you are going to edit the default template, first back up the folder.
I will show you how to start editing.
First of all, you need to tell the script wizard that you do not need precompiled headers. Edit this file in your favorite text editor:
\scripts\1033\default.js
Find this line:
var Pch = wizard.FindSymbol("PRE_COMPILED_HEADER");
and comment on some lines below this:
// if ((strAppType == "LIB" || ((strAppType == "CONSOLE") && // !wizard.FindSymbol("SUPPORT_MFC") && !wizard.FindSymbol("SUPPORT_ATL"))) && !Pch) { AddFilesToProjectWithInfFile(selProj, strProjectName); SetNoPchSettings(selProj); } // else // { // AddFilesToProjectWithInfFile(selProj, strProjectName); // SetCommonPchSettings(selProj); // }
Now open this file:
\templates\1033\Templates.inf
and find the first occurrence of [!else] and delete these 3 lines below:
stdafx.h targetver.h stdafx.cpp
This will give you a project without stdafx.cpp / .h or targetver.h, and the CPP file will not try to use PCH. However, it will not be created because we have not added #includes to the corresponding header files. I will leave this for you to find out:
(you can edit files that are generated automatically by modifying files in \templates\1033 )
source share