Visual C++ IDE from the trenches
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.
Anonymous comments are disabled