Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

3-min. Quickie: Compiling C++ Projects using only the Windows SDK and the Command Prompt

Download

Right click “Save as…”

I have received a couple questions about "How do you build C++ projects in Windows without installing Visual Studio?".  This video demonstrates the process but to explain it in a couple short steps:

*Make sure that you check to enable the Windows Native Code Development section on the installer.

** Although it is not a best practice, I elevated my priviledges for the command prompt when I did the demo because I wanted to show that projects build right out of the SDK. Had I copied the folder to my desktop, I would not have needed to run the Windows SDK command prompt priviledged.

This task is really useful if you want to perform automated builds on your own machine or you need to perform builds on a machine that doesn't need Visual Studio, such as a build server. However, this is not really a substitution for having Visual Studio for development.

For more information about building using the Windows SDK, see the Microsoft Windows SDK Blog.  For updates about the Windows Developer Center, check The See Also blog.

Tags:

Follow the Discussion

  • Kim GräsmanKim Gräsman

    Just a heads-up -- the description says "vcupdate" but the video says "vcupgrade". The latter is a tools that comes with VS.NET 2010, the former doesn't really exist.

  • CharlesCharles Welcome Change

    @Kim Gräsman: Fixed. Thanks for catching that.

    C

  • Great video. I would love to see more of these short videos on these types of topics.

  • @comfortEast: and that is why you should stay away from the microsoft specific "features". They are there in part you make you depend on their software. Money and all that... If you want something compatible with windows i can recommend mingw / mingw-w64 with Code::Blocks (a cross-platform IDE) Free open source goodness When you want something to work and that follows the standards then use open source GCC (mingw)
  • JohnJohn

    "This task is really useful if you want to perform automated builds on your own machine or you need to perform builds on a machine that doesn't need Visual Studio, such as a build server."
    Not exactly.  What's really needed for build servers is a documented way to XCOPY deploy the VC++ toolchain.  To guarantee repeatable builds now and in the future, you must be able to check the toolchain into source control.  Any process that includes running an installer has already failed.  Tools that depend on registry keys (e.g. COM objects), or files installed at fixed locations (e.g. GAC, WinSxS, %SystemRoot%\system32, %ProgramFiles%\msbuild, etc.), are fundementally incompatible with reliable build automation.
    Some day I hope DevDiv will understand this.
     

  • JohnJohn

    [quote]
    Mr Crash wrote
    i can recommend mingw / mingw-w64[/quote]
    That's fine if you want to make a politcal statement, or if you need to port a POSIX-centric codebase.  IMHO, it's bad advice if your goal is using the best tools available to develop native Windows applications.  Cost isn't a basis for comparison. The Microsoft C++ compiler is available for the same price as gcc -- zero.  In the Windows environment, I believe MSC is the technically superior solution.
     

  • Gus Classgclassy Helping developers rock at coding for Windows!

    @John "Any process that includes running an installer has already failed.  Tools that depend on registry keys (e.g. COM objects), or files installed at fixed locations (e.g. GAC, WinSxS, %SystemRoot%\system32, %ProgramFiles%\msbuild, etc.), are fundementally incompatible with reliable build automation."  

    You make a really good point, it would be very awesome to see improvements in our build tool chain that help with automation and allow you to repeatably and reliably store the build tools alongside your sources without requiring installers. Next time I bump into someone from DevDiv, I'll bring it up and see what they think. I'm guessing there's a better solution I haven't heard of Smiley

    Thanks for your comments!

  • Great video, thanks! As a developer with a UNIX background I appreciate being able to build from the command-line. My only nit is that the resolution of the video is too low res and it is hard to see what is going on. Please make the videos higher resolution.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.