locked
error C1083: Cannot open include file 'd3d10sdklayers.h': No such file or directory

    Question

  • I'm building my project on Windows 8 release preview with VS Express 2012RC.   The errors are:

    error C1083: Cannot open include file 'd3d10sdklayers.h': No such file or directory

    None of my source code files in the project include "d3d10.h". In fact "d3d11_1.h" is included. The only appearance of "d3d10.h" is in "External Dependencies" list. The following lines of code is found in "d3d10.h"

    #if !defined( D3D10_IGNORE_SDK_LAYERS ) 
    #include "d3d10sdklayers.h" 
    #endif
    Should I define D3D10_IGNORE_SDK_LAYERS in my project settings, though this solution may not be appealing?

    Friday, July 06, 2012 1:14 PM

All replies

  • d3d10.h is available in Metro style apps (the only kind supported by VS Express 2012 for Windows 8) so you can get to the various #defines that specify the 'caps' for Feature Level 10.0 and 10.1 devices. You should not need the D3D10SDKLAYERS.h.

    Friday, July 06, 2012 7:33 PM
  • d3d10.h is available in Metro style apps (the only kind supported by VS Express 2012 for Windows 8) so you can get to the various #defines that specify the 'caps' for Feature Level 10.0 and 10.1 devices. You should not need the D3D10SDKLAYERS.h.


    Chuck, thank you for your quick response. I don't need d3d10sdklayers.h so what's the best way to remove this compiler error?
    Friday, July 06, 2012 10:19 PM
  • You should not actually be hitting this #include for a Metro style app. The #include of d3d10sdklayers.h is inside the "Desktop" partition, which is not supported by VS Express for Windows 8. That is why we are trying to verify how exactly you are getting it included in the first place.

    (1) Make sure your app is in fact a Metro style app

    (2) If you are upgrading from the Beta, be sure to rebuild the project per the migration guide

    Friday, July 06, 2012 10:39 PM
  • Thanks again Chuck.

    In fact I'm building a static library project that acts as a DirectX wrapper. This project serves as the graphics rendering module of the whole solution. We use CMake to manages the solution and are trying to port it from Win32 desktop to Windows 8 RT. I guess there may be some configurations in the solution (.sln) or project (.vcxproj) files generated by CMake that make VS2012 believe it's a deskotp static library project.


    • Edited by Leonard Saturday, July 07, 2012 1:22 PM
    Saturday, July 07, 2012 1:22 PM
  • It is quite likley CMake doesn't support VS 2012 .sln/.vcxproj files yet.


    Friday, July 13, 2012 1:23 AM
  • We'll use VS2012 "New Project" wizard to manage the project for now.

    Friday, July 13, 2012 1:56 AM
  • I just ran into this issue today as well.  I have a static C++ library that depends on D3D11.  The library is linked into a Metro application that previously built fine using the Visual Studio 2012 RC.  However, the new Metro specific version of Visual Studio 2012 Express cannot build this library due to the error the original poster cited.  To be sure, I've also tested compiling this library in the trial version of Visual Studio 2012 Professional, and this error is not generated.

    Having a legacy static C++ library wrapping or depending on D3D11 is going to be a very common thing, as more and more developers begin to migrate to Windows 8 and Metro development.  I'm surprised this hasn't been more frequently reported yet.

    Saturday, September 29, 2012 5:10 PM
  • D3D10SDKLayers.h is only in the full Windows 8.0 SDK, not the Windows Store apps (aka Metro) subset of the SDK included with VS 2012 Express.

    Monday, October 01, 2012 9:36 PM
  • BrianGFX, you may check "Windows Store support" in project configuraton to remove this compiler error. It works for me.
    Wednesday, October 03, 2012 1:22 PM
  • I am having the same problem with VS 2012 express.

    My app is a Metro style app and I'm doing something very similar. A static library is referencing another d3d11renderer static library that includes d3d11.h, windows.h, agile.h and several other directx utilities. The interface has to have the CoreWindow so using the Pimple pattern doesn't help me as well :(

    Where is the "Windows Store support" in the project configuration?

    Did you find it in the project properties somewhere? 

    Monday, February 11, 2013 4:01 PM
  • Yes, it's in project properties. Just navigate to "Configuration Properties, General".
    Tuesday, February 12, 2013 4:01 PM