Integrating the Platform SDK into MS Visual C++ Express
August 23rd, 2008 at 9:39 amAs 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.
- Open
VC++, go to Tools | Options | Projects and Solutions | VC++ Directories. In the top right corner, chooseExecutable filesfrom the dropdown list. Change the line that saysPlatformSDKto the realBindirectory under your platform SDK’s installation path (you can browse to it after double-clicking the line). For me the line is nowC:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin. - Repeat the previous step with
Includefiles (pointing to theIncludedir in the SDK) andLibraryfiles (pointing to theLibdir in the SDK) - 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 saysAdditionalDependencies. 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. - 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;
- 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.
Related posts:
