josh's WebLog

Visual C++ IDE from the trenches

understanding the VC project system part I: files and tools

the first key to understanding the VC project/build system is understanding what we do with the source files in a project.
each file in a VC project (foo.cpp, for instance) has a "tool" associated with it, based initially on the file's extension. the default tool assigned to foo.cpp would be the c++ compiler tool. the tool can be changed by the user if they so desire, but usually the default tool is appropriate.
when a project is built a tool gets called to do its stuff. usually that means spawning a process to run a command-line executable that does the actual work. for the C++ compiler the command-line tool that gets spawned is cl.exe.
tools also have properties that can be set on them, which generally are transformed into switches on the command-line tool. for instance setting the "Treat warnings as errors" property on the C++ compiler tool causes the "/WX" switch to be sent to cl.exe.
the properties on a tool are visible in "Property pages" dialog. to open this dialog: right-click on the project node in the "Solution Explorer" window and select the "Properties" menu item. select the "C/C++ compiler" node and you will see the "Treat warnings as errors" property in the property grid.
i'll talk more about the property pages dialog and properties in my next entry.
Published Tuesday, February 03, 2004 5:46 PM by josh_

Comments

 

Stephane said:


Is there any partiuclar reason other than a marketing reason why you guys have never published a backward project converter so that Visual C++ 6.0 could compile Visual C++ 7.0 projects, like this one : http://www.codeproject.com/tools/prjconverter.asp

I understand that in VC++ 7.0 the MFC/STL/ATL stuff have been upgraded, as well as the default platform headers, but wouldn't that help to manage 80% of the work, and a lot of the projects that don't explicitely use the latest features?

Further on, doesn't a backward converter encourage the adoption of the next version, ironically?

Rgds.
February 5, 2004 1:06 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker