|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionMicrosoft 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:
What You NeedVisual C++ 2005 ExpressGo 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 SDKDownload 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 SDKMost of this is based on the official instructions which can be found here. Include DirectoriesWithout 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:
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:
This is a major stumbling block for many people. Verify the directories before adding them! Default Link LibrariesWithout 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 ApplicationsEdit 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 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 GetWhat 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:
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 CommentIf you know of other truly free software pieces that may be handy in this regard, please post a comment. History
|
||||||||||||||||||||||