mardi 6 janvier 2015

Visual C++ service fails to compile against Windows SDK 8.1, missing ktmw32.h


I have inherited the maintenance of a Visual C++ project that implements a Windows Service for talking to some custom hardware device.


When attempting to build the project against Windows SDK 8.1 it failed with the following error indicating missing include file ktmw32.h


C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\atltransactionmanager.h(22): fatal error C1083: Cannot open include file: 'ktmw32.h': No such file or directory


So I searched my PC for ktmw32.h, and found just one copy, located within Windows SDK 8.0, under C:\Program Files (x86)\Windows Kits\8.0\Include\um


If I copy ktmw32.h from SDK 8.0 to SDK 8.1 everything builds fine.


My question is:



  1. Why am I getting the original compile error against Windows SDK 8.1? (Note it compiled fine against 8.0 and earlier.)

  2. Is my little fix, copying the header file across, okay and safe? (Or is there a better solution?)





Aucun commentaire:

Enregistrer un commentaire