3-min. Quickie: Compiling C++ Projects using only the Windows SDK and the Command Prompt
- Posted: Jan 21, 2011 at 1:09 PM
- 38,967 Views
- 9 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
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.
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
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.
@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.
"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.
[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.
@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
Thanks for your comments!
I read your article and saw the presentation of this new technology and I can say as a programmer in C / C + + that I succeeded in compiling and running complex projects done in C / C + + by installing the Windows SDK version 7.1 and using command prompt. I can say that I have concluded that by using Windows SDK 7.1 and command line compiling and running C / C + + projects is much faster, greatly reducing the resources occupied on the computer can be on different operating systems such as win 32 X 64 X 86 and many others, in contrast with Visual C / C + + compiling and running projects, where C / C + + is slower and takes up more space in your computer resources.
Rent A Car Cluj
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