fatal error C1083: 无法打开包括文件:“SDKDDKVer.h”

http://www.global-webnet.com/Blog/post/2012/04/14/Kinect-SkeletalViewer-Cannot-open-include-file-SDKDDKVerh-No-such-file-or-directory.aspx



The solution is 3 easy steps...

While evaluating C++ development for the Kinect (for my http://SolrContrib.CodePlex.com project) I ran into issues compiling the newly installed project from the Sample (on a fresh install of Windows 8 and Visual Studio 2011).   In the end I found that "the juice wasn't worth the squeeze"; the C# demos performed just as well as the C++ demos (in the same task that will meet my concerns) with a fraction of the coding (and learning curve).  

fatal error C1083: 无法打开包括文件:“SDKDDKVer.h”_第1张图片

Binging a solution wasn't productive - I am a C# developer (with no understanding of the C++ environment) trying to compile a project under Windows 8 using Visual Studio 2011.  I learned early that when you live on the bleeding edge that sometimes you have to bleed, I was hemorrhaging.

I did however find an excellent clue within the VS11: C++ include directories not set correctly in new project bug reported on the Microsoft site.  There was enough information to let me know that I required a "Windows Kits" folder (WindowsSdkDir) which will hold the SDKDDKVer.h.   Long story short the Bing trail took me to the following:

 

Windows Driver Kit (WDK) 8 Consumer Preview: http://msdn.microsoft.com/en-us/windows/hardware/hh852362 

  • Step #1 - Download and install this development kit, I wasn't trying to create Windows Drivers, however I felt it was safe to assume it would have everything Windows Drivers developers required to compile their C++ applications.   The assumption paid off; after I installed it, along with the Windows Driver Frameworks (WDF) Co-Installers it will recommend that you install, the folders were now available!

 

But I was still not compiling!  I went back to bug report and like Jennifer I did not have the required "/shared" folder in the Include directories path (which she manually added).  HOWEVER, I did note a checkbox setting [ ] inherit from parent or project defaults as I stumbled around trying to find "HOW" includes worked in this environment (using the following steps):

Step #2 - comply with the following steps

  1. Right click on SkeletalViewer Project
  2. Select Properties
  3. Open Configuration Properties (ref SkeletalViewer Property Pages in image below)
  4. Selected VC++ Directories (not shown in image)
  5. Select Include Directories (shown in image below)
  6. Click the dropdown box (down arrow icon) that will appear to right of input field
  7. Select Edit (you will see Include Directories windows shown in image below)
  8. Click the Macros button and scroll down to the WindowsSDK_Include path (shown below)

I saw how the $(WindowsSDK_includePath), included with "Inherited values", contained my /Shared folder!!!

I clicked the Checkbox Inherit from parent or project defaults, exited all windows applying updates as applicable. 

I Hit compile and  I got another error - this time for a .lib file (can't recall what it was). 

Step #3 - I followed the same steps from 5 on for the Library Directories path.

I Hit compile and Walla!  I can compile and run the KinectViewer application! 

fatal error C1083: 无法打开包括文件:“SDKDDKVer.h”_第2张图片


你可能感兴趣的:(c,windows,image,Microsoft,include,frameworks)