Click here to Skip to main content
Click here to Skip to main content

Using the Free Visual C++ 2005 Express Edition to Develop Win32 Applications

, 23 Sep 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
Describes how to set up Visual C++ 2005 Express to build Win32 applications.

Introduction

Microsoft has released Visual C++ 2005 Express Edition which can be freely downloaded and used, even for developing commercial applications. However, if you wish to develop good old native 32-bit Windows applications (i.e. not .NET) such as applications that use the wxWidgets Framework, you need to make a few configuration changes.

The information in this article is not new and most of it can be found by Googling or by clicking this link. Much of it is also on the Microsoft forums, but I decided to create this article for the following reasons:

  1. To store this information for reference to ensure it remains accessible
  2. To save people time by having it all in one place (I had to Google to find bits and pieces.)
  3. To have a place where people can add additional useful information (The Microsoft forums do not seem to work anymore, so I cannot add notes on there and some people are stumbling on this as well.)
  4. To encourage developers out there to release their efforts and to help them find some good free tools to get started

What You Need

Visual C++ 2005 Express

Go to the Microsoft Web site and download "Visual C++ 2005 Express". Likely you will want to download a file named VC.iso (473,720 KB). Burn this to a CD or use a free tool such as VCdControlTool or DiskPrivate to access the contents. Install it using the default locations.

Platform SDK

Download the Platform SDK from Microsoft's Web site. I got PSDK_x86.exe (1.26 MB). Search for Platform SDK which will locate "Microsoft ® Windows Server® 2003 R2 Platform SDK Web Install" (See link here). If you scroll down you will see PSDK_x86.exe. That is the only piece you need.

Install the Platform SDK using its default recommended settings. I did not run the batch file to register it with Visual C++ (it puts it in the Start menu but it does not seem to accomplish anything if you do run it, so I had it unregister itself again using the option in the Start menu).

How to Make Visual Studio Work with the Platform SDK

Most of this is based on the official instructions which can be found here.

Include Directories

Without fixing this, you will get errors such as not being able to include windows.h. Start Visual Studio and in the menu under the Projects and Solutions section in the Options dialog box, add the paths to the appropriate subsections:

  • Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
  • Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
  • Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

Be sure to check that these paths are remembered by Visual Studio! Close the view and go back there and make sure it remembers them! Also use Windows Explorer to verify these directories as the SDK may have installed to a different directory. The directories may in fact be:

  • Executable files: C:\Program Files\Microsoft Platform SDK\Bin
  • Include files: C:\Program Files\Microsoft Platform SDK\Include
  • Library files: C:\Program Files\Microsoft Platform SDK\Lib

This is a major stumbling block for many people. Verify the directories before adding them!

Default Link Libraries

Without fixing this, you will get unresolved external link errors about Windows API functions. Close Visual Studio and then edit C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops and change:

AdditionalDependencies="kernel32.lib"

to:

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib
    comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Enable Win32 Applications

Edit the file C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\AppSettings.htm. Using Notepad or any plain text editor, put // in front of the following lines (as well as any other disabled = true lines if you want):

WIN_APP.disabled = true;
WIN_APP_LABEL.disabled = true;
DLL_APP.disabled = true; 
DLL_APP_LABEL.disabled = true;

BUT...

And that should do it! BUT...

What You Do Not Get

What About MFC?

Not included. You can use something like wxWidgets as an alternative for new development work. Likely if you want MFC though, then you need to pay.

What About ATL / WTL?

Not included. However, you can apparently get ATL / WTL as explained in another CodeProject article, Using WTL with Visual C++ 2005 Express Edition.

What About a Free Resource Editor?

Studio Express does not let you edit resource files. Taken from the above article, you can try:

  1. Here is a list of free resource editors (Looks like the Watcom C++ compiler has a standalone resource editors application)
  2. WEditRes
  3. Or (for an IDE that also seems to let you edit resources): RadASM© Win32 assembly IDE for masm/tasm/fasm/nasm/goasm/hla
  4. wxWidgets also has some sort of system where you use XML to define your resources and there are free RAD applications, but I have not looked into that yet.

What About an Installer?

If you wish to create an install/uninstall for your applications, I suggest you try the free Inno compiler. Free for commercial applications even and easy to use.

What About Other Compilers that Integrate with Visual Studio?

Visual Studio Express does not let you install other compilers such as Intel Fortran that integrate directly with Visual Studio Express. However, some of these provide their own IDEs.

Final Comment

If you know of other truly free software pieces that may be handy in this regard, please post a comment.

History

  • 23rd September, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

NeWi
Web Developer
Canada Canada
No Biography provided

Comments and Discussions

 
GeneralSomething else to try if you still can't build PinmemberDavid Hooker19-Aug-07 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 23 Sep 2006
Article Copyright 2006 by NeWi
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid