29 03 2008

CMake and Microsoft Visual C++ 2005 Express

Category: Hubris

This is just a reminder to myself and maybe others as well of how to get CMake and Visual C++ 2005 Express playing together nicely. Namely, how to get past the following error when trying initialize a project using CMake:

  LINK : fatal error LNK1104: cannot open file 'user32.lib'

The problem is that you’re missing the Windows Platform SDK. But just installing it is not enough. Microsoft has the details, but in short you have to:

  1. Install the Platform SDK.
  2. In VC++, add the following paths to the Tools | Options | Projects and Solutions | VC++ Directories page. Be sure to click the checkmark button to verify the paths.
    • 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

With that, the linker error should go away.

1 Comment so far

  1. Saju Panikulam May 6th, 2008 4:33 pm

    THANK YOU, THANK YOU and THANK YOU yet again for the tip from Screen 13. Aaargh…hate MS for this.

Leave a comment