Click here to Skip to main content
15,860,859 members
Articles / Desktop Programming / Win32
Article

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

Rate me:
Please Sign up or sign in to vote.
4.46/5 (14 votes)
23 Sep 2006CPOL4 min read 206.9K   59   19
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):

C++
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)


Written By
Web Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralAnother Resource Editing Option Pin
Netstanley21-May-07 9:14
Netstanley21-May-07 9:14 
Generalcannot find ...\1033\AppSettings.htm Pin
fab!an7-May-07 23:51
fab!an7-May-07 23:51 
GeneralCoolio Pin
Nigel Atkinson22-Apr-07 18:19
Nigel Atkinson22-Apr-07 18:19 
GeneralFree GUI Designer for Win32 native applications Pin
_flix01_18-Jan-07 7:27
_flix01_18-Jan-07 7:27 
GeneralA good and free resource editor Pin
yarp29-Oct-06 20:04
yarp29-Oct-06 20:04 
GeneralUsing GLUT With Visual C++ Express Edition Pin
Ashwin Nanjappa26-Sep-06 16:40
Ashwin Nanjappa26-Sep-06 16:40 
GeneralMFC Pin
RomanOk25-Sep-06 11:25
RomanOk25-Sep-06 11:25 
GeneralRe: MFC Pin
Danny Ruijters26-Oct-08 2:22
Danny Ruijters26-Oct-08 2:22 
GeneralAnother resource for you Pin
David O'Neil23-Sep-06 12:45
professionalDavid O'Neil23-Sep-06 12:45 

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

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