Effects11d.lib file, DirectX11 on visual studio 2017/2015 - c++

Nowdays my team study DirectX11 with book which name is introduction to 3D game programming with DirectX11.
we are trying to set up our visual studio(ver 2017, 2015) as the book says. But we failed because Effects11d.lib file is missing.
Where can we download or find that file?(the file isn't on C drive where windows installed)
If there is any other solution, please give me an advice

The DirectX 11 book you are using most likely expects you to be using the legacy DirectX SDK. The issue is that the Windows SDK that comes with VS 2015 and VS 2017 contains newer headers than those that shipped in the now 8 years old legacy DirectX SDK where they overlap, and some portion of the legacy DirectX SDK is deprecated so is not present on your system already.
You can still use the legacy DirectX SDK with VS 2015 / VS 2017, but you need to take some extra steps. Most of those steps are detailed at the bottom of this MSDN page.
There are also known issues trying to install the legacy DirectX SDK. See this post.
You should also review the post: Where’s DXERR.LIB?
Specifically using the Effects 11 library, you should use the latest from from GitHub which you can also find on NuGet. The latest version works both with and without using the legacy DirectX SDK.
Ideally you should avoid using the legacy DirectX SDK all together. See Living without D3DX and The Zombie DirectX SDK for details.

Related

Problems running DirectX samples in Debug, "Failed Creating the Direct3D Device"

I'm trying to navigate and compile the poorly documented DirectX SDK samples in Windows 10 and Visual Studio 2015.
I got the samples to build using Windows 10 SDK in Release mode, but in Debug I'm getting the error Failed Creating the Direct3D Device
Searching online, this error appears to be linked with a missing installation of D3D11_1SDKLayers.dll, which, by my understanding is linked to the Graph Tools of Visual Studio
I tried installing the Graph Tools using Windows 10->Start Menu->Settings->System->Apps&Features->Manage Optional Features->Add a Feature, but all I see are supplemental fonts, I don't see Graph Tools in the list
Can someone help explain what I'm actually missing in order to build the projects in Debug
Thanks,
In Windows 10, the Direct3D Debug Device is indeed a Windows Optional Feature. The main reason you wouldn't see "Graphics Tools" in the list of available features is because you are running the Enterprise Edition and your local IT admin hasn't approved the installation of that Feature-on-demand. See this blog post.
The DirectX SDK itself is deprecated and has been for 6+ years. See MSDN and this blog post.
I maintain some of the samples from the legacy DirectX SDK updated for newer Windows 10 SDKs / VS 2015 on GitHub, but the official DirectX 12 samples are on DirectX-Graphics-Samples. You can also find both DirectX 11 & DirectX 12 samples on Xbox-Graphics-Samples.
If you are new to DirectX and are looking for C++ tutorials, I'd recommend starting with the DirectX Tool Kit.

Where is the SDK for DirectX on Win10?

I was just told that the SDK that I was using (Jun 2010) is not to be used anymore and that I need to use whatever new one they have included to Win10. Well where is it?
I am trying to start a graphics demo solution and I can't call D3D11 functions because of Linker errors which to me means I need to include libraries and such.
If anyone can help me figure this out so I can get the ball rolling then I'll be good.
The Microsoft Doc page Where is the DirectX SDK? tells you to use the Windows SDK, specifically the Windows 8.0 SDK, Windows 8.1 SDK, or Windows 10 SDK to do DirectX development (which is assumed to be Direct3D 11 or Direct2D/DirectWrite). Direct3D 12 requires the Windows 10 SDK.
If you are using Visual Studio 2013 or later, then you already have the Windows 8.1 SDK and optionally the Windows 10 SDK.
An important detail is that the D3DX library (D3DX9, D3DX10, and D3DX11) is deprecated and only available in the legacy DirectX SDK. That means D3DX11 is not part of the Windows SDK, and you shouldn't use it.
UPDATE: For older projects, the legacy DirectX SDK 'end-of-life' June 2010 release of the D3DX9, D3DX10, and D3DX11 library is provided in this NuGet package which is to be combined with the Windows 10 SDK. See this blog post for the full details.
For HLSL, you use D3DCompile directly or the FXC that comes with the Windows SDK. For math, you use DirectXMath that comes with the Windows SDK. If you are using legacy Effects 11, you can use the version from GitHub. I recommend you also take a look at DirectX Tool Kit for DirectX 11 and it's tutorials. For a complete list of replacements for D3DX, see Living without D3DX.
If you really want to continue to use the legacy DirectX SDK components with Visual Studio 2012 or later, you can but you should note the details at the bottom of the MSDN page above. Notably you have to reverse the include/lib path order when you add the legacy DirectX SDK to your project.
For a complete catalog of where the various bits of the old DirectX SDK ended up, see DirectX SDKs of a certain age, DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, as well as the Living without D3DX article above.
The Direct3D 11 Debug Device for Windows 10 is not installed by any Windows SDK or by the legacy DirectX SDK. It is a windows optional feature. See Direct3D SDK Debug Layer Tricks.
The actual "DirectX Runtime" has been part of the operating system since Windows XP Service Pack 2. The legacy DirectX SDK never installs "DirectX" on any modern version of Windows, and only deploys some optional side-by-side stuff. It's not required at all if you using the Windows SDK. See Not So Direct Setup.

Where can I find 'winmm.lib' (I'm using Visual Studio 2012)

My OS is 64Bit Windows 7.
I wanted to build the DirectX Sample in
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D10\Tutorials\Tutorial02.
but when I build error occured with fatal error
LNK1104: 'winmm.lib' can't open the file.
I reinstalled Direct SDK, but no change. I also added the path (include, lib) to the settings.
If I remove 'winmm.lib' from the project settings, 'comctl32.lib' can't be opened.
both libs were already present in properties>Linker>Input.
How can I solve this problem?
Just put the line below in stdafx.h
#pragma comment(lib, "winmm.lib")
winmm.lib isn't part of the DirectX SDK but is part of the Windows SDK.
Latest Windows SDK versions were also heavily reorganized but it includes the library you're looking for.
If you are trying to build any of the legacy DirectX SDK samples with VS 2012 or VS 2013, you need to modify the include/libs paths per the instructions on bottom of the page on MSDN. The most important change is that you must reverse the Include/Lib path order:
For VS 2010 it was:
$(DXSDK_DIR)Include;$(IncludePath)
$(DXSDK_DIR)Lib\x86;$(LibraryPath) or $(DXSDK_DIR)Lib\x64;$(LibraryPath)
For VS 2012/2013 it has to be:
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x86 or $(LibraryPath);$(DXSDK_DIR)Lib\x64
Of course a better option is not spend time learning the older Direct3D 10 API at all, and use the latest Direct3D 11 Win32 desktop tutorials on MSDN Code Gallery. In fact, I've posted many of the legacy DirectX SDK samples there so they work fine with VS 2012/2013 Express for Windows Desktop and VS 2012/2013 Pro+ as-is without the DirectX SDK at all.
Read these blog posts:
DirectX SDK Samples Catalog
DirectX SDK Tools Catalog
Living without D3DX
DirectX SDKs of a certain age
And review these CodePlex projects:
DirectX Tool Kit
DirectXMesh
DirectXTex
DXUT for Direct3D 11
Effects 11

directx 9 cannot find the include libraries

I wanna start learning DirectX in Visual C++ 2010, but it says that d3dx11 and d3dx9 can't be found when I include d3dx9.h, I can play games in DirectX 11 and dxdiag says my computer is running directX 11, but when I searched for DirectX 11 in C drive and my D-Drive, it couldn't find anything. So I decided to install DirectX 11 and then I got a folder after installing, but it didn't have any include or bin folders, so I couldn't go to properties and VC++ and add the include directories. Decided to try DirectX 9 instead to start with, but when I installed DirectX 9 June 2010 version, I went to C\Microsoft DirectX SDK (June 2010) there is no directories, only DirectX utilities and documentation for c++ and sample browser and Command prompt. So I don't really know what to do anymore, I have tried to install d3dx9.lib and put in in the default lib folder for VS 2010. but no success, But I have DirectX 9 2004 summer libraries and Include folders set up for visual c++, but that is such an old version so it doesn't include d3dx9.lib. I'm running Windows 8.1 64 bit OS.
The DirectX SDK and all version of the D3DX libraries are both deprecated.
The 'modern' solution is to use the Windows 8.x SDK which comes with Visual Studio 2012 and Visual Studio 2013. You can install the Windows 8.1 SDK 'standalone' and use it with Visual Studio 2010 by using .props files. See MSDN and this blog post for all the details.
You can mix using the Windows 8.x SDK with the legacy DirectX SDK in order to continue to use D3DX for Win32 desktop applications--you cannot use the DirectX SDK for Windows Store apps, Windows phone, or Xbox One. See the instructions on MSDN for how to handle the include/lib path directories. If you are going to continue to use the legacy DirectX SDK, you need to be aware of a number of things:
The DirectX SDK (June 2010) installer has some compatibility issues with systems that have VS 2010 SP1 REDIST installed. See this post.
The DirectX SDK (June 2010) does not have the latest developer debug runtime for Windows 8.1. You have to install the Windows 8.1 SDK, VS 2013, or the VS 2013 remote debugging tools to get the DEBUG layers and REFERENCE device. See this post.
There is no support for the Direct3D 9 DEBUG device on Windows 8.1.
The "PIX for Windows" tool in the DirectX SDK does not work for Direct3D 10.x or Direct3D 11.x on Windows 8.1, Windows 8.0, or Windows 7 SP1 with the DirectX 11.1 Runtime installed. Use the Visual Studio 2013 Graphics Diagnostics, or Intel/AMD/NVIDIA's GPU tools.
If you are deploying a game that needs the legacy DLLs like D3DX, be sure to use the April 2011 refreshed version of DXSETUP and not the copy that is in the DirectX SDK (June 2010). See this post and be sure to read Not So DirectSetup.
Given all that, your life will be a lot easier if you just use Direct3D 11 and avoid the legacy DirectX SDK and D3DX entirely. You can find many Direct3D 11 replacements for D3DX that only requires the Windows 8.x SDK along with a bunch of updated samples. See Living Without D3DX, DirectX Tool Kit, and DirectX SDK Samples Catalog. You can get all that to work with VS 2010, but it's a lot easier to get Visual Studio 2013 Express for Windows Desktop (for Win32 desktop applications) and/or Visual Studio 2013 Express for Windows (for Windows Store apps and Windows phone apps).
PS: Even back when the DirectX SDK was still the supported way to get Direct3D headers for VS 2010, it was not available until you manually added the include/path directories to your project. That's why you can't include "d3dx9.h" in your project freshly created.

Directx 11.0 with visual studio 2012 on windows 8 64 bit

I want to begin learning DirectX 11.0 . I have Visual Studio 2012 ultimate installed on windows 8 pro 64 bit. I want to be able to develop games that would run in windows 7 as well.
Is this possible without downloading June 2010 SDK? or will the Windows SDK do? Can somebody post links to the right tutorials please?
I do not prefer 3rd party solutions and I want to avoid downloading the June 2010 SDK if possible.
Notes:
I have some experience with 3D game development in XNA.
I am a total newbie to DirectX.
Update:
DX SDK is now included in Windows SDK.
But I have not seen any tutorial talking about developing desktop games using this already included SDK.
Most of them ask to download DX June 2010 SDK; probably these tutorials have not updated themselves after arrival of VS2012.
And the recent ones talk about porting a VS2010 DX game to VS2012, and the first step generally is to download the DX June 2010 SDK.
Therefore, I am beginning to suspect whether it is possible to build desktop games using this new inbuilt SDK?
Or indeed one has to download the June 2010 DX SDK?
or June SDK needs to be downloaded only when porting VS2010 games to VS2012?
you have to download the DX SDK from MSDN I read the documentation
http://msdn.microsoft.com/en-us/library/windows/apps/hh452744.aspx
Programs compiled on visual studio 2012 with the built in SDK should work perfectly well on windows 7 (subject of course to not using any new API calls or anything). I'm running vs2012 on windows 7 using d3d11 and the programs it builds run perfectly well on there.