Ask a questionAsk a question
 

AnswerVC 2008 / MSBuild - where is the compiler?

  • Wednesday, November 04, 2009 2:07 PMDavidTM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi

    I am confused about the tools required to build a native C++ executable. Naturally, I can do the build with VC 2008, but I want to consider using just MSBuild for the case of a build server. My understanding is that MSBuild is sufficient for .NET projects, but is this also true for native C++ projects?

    I noticed when building my project with MSBuild in verbose mode, that vcbuild.exe is invoked, which looks to be part of VC 2008. Is the compiler for native C++ projects only supplied with the IDE?

    Best regards

    David

Answers

  • Wednesday, November 04, 2009 4:53 PMLlelan D. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    MSBuild is a generalized build system that can handle any of the languages or frameworks. The C++ compilation is actually done by the CL.exe tool, and the compiled modules are linked together with link.exe . You will find these tools in "c:\Program Files\Microsoft Visual Studio 9.0\VC\bin". The tools are also supplied with the Visual Studio Express editions.

    You can create an MSBuild script with a text editor that run tasks that call these tools, and then run MSBuild from the command line. You can learn how to create MSBuild scripts and how to use the tool in the MSDN MSBuild documentation . That link is for VC2008 and has two introductory walkthroughs. There is a similar section in the same relative position in the VC2010 documentation. There are additional references in the .NET 3.5 documentation.

    I hope that helps.
    • Marked As Answer byDavidTM Thursday, November 05, 2009 11:27 AM
    •  

All Replies

  • Wednesday, November 04, 2009 4:53 PMLlelan D. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    MSBuild is a generalized build system that can handle any of the languages or frameworks. The C++ compilation is actually done by the CL.exe tool, and the compiled modules are linked together with link.exe . You will find these tools in "c:\Program Files\Microsoft Visual Studio 9.0\VC\bin". The tools are also supplied with the Visual Studio Express editions.

    You can create an MSBuild script with a text editor that run tasks that call these tools, and then run MSBuild from the command line. You can learn how to create MSBuild scripts and how to use the tool in the MSDN MSBuild documentation . That link is for VC2008 and has two introductory walkthroughs. There is a similar section in the same relative position in the VC2010 documentation. There are additional references in the .NET 3.5 documentation.

    I hope that helps.
    • Marked As Answer byDavidTM Thursday, November 05, 2009 11:27 AM
    •  
  • Thursday, November 05, 2009 11:28 AMDavidTM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks for your answer.
    David