As I wrote here, I'm using Microsoft's free Visual C++ Express edition (2005) for my home C/C++ coding. Today I reinstalled VC++ on my computer, and found the links that explain how to integrate the platform SDK into it not functioning. So I want to summarize what to do here, for posterity's sake.

Integrating the platform SDK itself

First of all install it. If you're just installing now, it may be more convenient to install it to the VC installation directory, under PlatformSDK. But even if you've already installed it (to the horrible default path C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2), these directions will work.
  1. Open VC++, go to Tools | Options | Projects and Solutions | VC++ Directories. In the top right corner, choose Executable files from the dropdown list. Change the line that says PlatformSDK to the real Bin directory under your platform SDK's installation path (you can browse to it after double-clicking the line). For me the line is now C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin.
  2. Repeat the previous step with Include files (pointing to the Include dir in the SDK) and Library files (pointing to the Lib dir in the SDK)
  3. If you've installed VC++ in the default location, edit the file %ProgramFiles%\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops. There's a line there that says AdditionalDependencies. Make it list these libraries: kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib. This will ensure that all the SDK library files are added to your projects.
  4. Bonus: If you want to be able to use the New Project wizards for Win32 apps, do the following: edit the file %ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\AppSettings.htm, and comment (C++ style) lines 357-359:
    //WIN_APP.disabled = true;
    //DLL_APP.disabled = true;
    //LIB_APP.disabled = true;
    
    And lines 441-444:
    //WIN_APP.disabled = true;
    //WIN_APP_LABEL.disabled = true;
    //DLL_APP.disabled = true;
    //DLL_APP_LABEL.disabled = true;
    
  5. That's it ! You should now be able to compile and build Win32 applications with your VC++ 2005 Express.

Integrating the platform SDK's MSDN

VC++ Express comes with MSDN express, but the Platform SDK's functions (like the whole Win32 API) won't be listed in it by default. Integrating them is very easy. Just open the MSDN (F1 in VC++). Paste ms-help://MS.VSExpressCC.v80/dv_vsexpcc/local/CollectionManagerExpress.htm into the URL bar, click the self-explanatory checkbox in the bottom of the page, press the button and restart VC++ and MSDN. You're done.

Comments

comments powered by Disqus