c++ - VS2008 win32 project defaults - remove default precompiled headers -


I have been through every option that I find a way to make IDE the new win32pject without any precompiled headers To try. I have read every formula on this forum with "preppiled headers" in that word and I found the closest I got:

Using the 2008 pro (not express, though the behavior is so similar It seems as I did:

File -> New -> Project

This new project dialog opens in which I select Visual C ++ Win32 project, a name Enter and press OK.

Then let me know the "Win32 Application Wizard" With the application type set to "Windows application", the application settings panel will not allow me to uncheck the pre-compiled headers. The check box is greyed out. If I select "console application" then I I can uncheck this, but I'm making a GUI app.

When I click on the end, I get the code at xxx.cpp at 6 yards out of four, four headers Files and Mandatory stdafx. CPP.

Maybe I can remove and delete all of these things and go into properties and turn off PCH, but there is a problem for many small project examples which I want to write.

> I just want an empty project that will compile a Win32 app, then how do I change PCH default?

You can create your own template to do this, or you can edit the default one The related wizards can be found here:

  C: \ program files \ Microsoft Visual Studio 9.0 \ VC \ VCWizards \ AppWiz \ Generic \ Application  

Obviously if you are editing the default template, then back up the folder first.

Let me show you how to get started on editing it.

Firstly, you have to specify that the wizard script which you do not want precompiled headers, edit this file in your preferred text editor:

  \ scripts \ 1033 \ Default.js  

Find this line:

  Virus PK = Wizard. Fund Simbol ("PRE_COMPILED_HEADER");  

And comment some of the following lines like this:

  // if ((strAppType == "LIB" || ((strAppType = "Console") and // wizard.fundsmubble ("SUPPORT_MFC") & wizard fund symbol ("SUPPORT_ATL")) & amp; amp;; PP) {AddFilesToProjectWithInfFile (selProj, strProjectName); SetNoPchSettings (selProj); } // and // {// AddFilesToProjectWithInfFile (selProj, strProjectName); // SetCommonPchSettings (selProj); //}  

Now open this file:

  \ templates \ 1033 \ Templates.inf  

and Find [! Else] and delete the 3 lines below it:

  stdafx.h targetver.h stdafx.cpp  

Will give a project without stdafx.cpp / .h or targetver.h, and the CPP file will not try to use PCH. Although this will not be produced because we have not included any # in the appropriate header files, I will leave it for you to remove :) / (You can modify the file by modifying the file in \ templates \ 1033 Edit the files generated)


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -