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.
  • who, what, why

    this being the first post in this blog, those are the obvious questions. who is easily answered ("josh shepard, a developer on the Visual C++ IDE's project/build system team"), what and why less so. the intention of this blog is to be a source of information on the functionality, features and general nature of the Visual C++ IDE, focusing primarily on the project system, on which i work. hopefully i'll have the chance to answer some of the questions that people have about the VC IDE and provide some insight on why things work (or don't work) the way they do. in my experience working on the VC project system team (a total of about 6 years) i have discovered that most developers don't fully understand how the project system works and thus aren't able to take full advantage of it. i know that i didn't before i started on this team. of course, i'm occasionally surprised by the user that really does have a deep understanding of it. there doesn't seem to be a good source of information about how to set-up projects and solutions that are maintainable, scalable, shareable etc. hopefully i can provide some information here that will help. stay tuned
More Posts « Previous page

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