DirectX11 Help - project only compiles in release, not debug (Rastertek tutorial)

Associate
Joined
28 Oct 2017
Posts
2
Hi guys, I'm following the rastertek tutorial on building a D3D engine.

I just got to tutorial 6 -

http://www.rastertek.com/dx11tut06.html

where it's still deprecated and using older D3D types like D3DXVector3 instead of XMFLOAT3 for example. Anyway, I replaced all the deprecated types, and got it to compile and run fine in release mode. But It won't compile in debug mode and throws over 1000 errors about some weird files in the Win 10 sdk folder having issues, like OAIdl.h and stuff.

Example:
1>c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\oaidl.h(5641): error C2061: syntax error: identifier '__RPC__inout_xcount'

https://i.stack.imgur.com/J5UfE.png

Before it wouldnt compile because D3DCompileFromFile wasnt recognized, but I fixed that by adding d3dcompiler.h in the linker in project settings.

I even deleted the #include <windows.h> thinking it was a circular dependency but it actually still compiles without teh windows.h - in release mode only, once again!

I'm completely out of ideas here, could somebody please look at the repo (link below) - the D3DCompileFromFile error which I fixed was happening in LightShaderClass.cpp - I've been in hell for 2 days straight now trying to figure this out! Any help would be a godsend, thanks.

https://github.com/mister51213/DirectX11Engine
 
Associate
Joined
8 Oct 2008
Posts
260
Which version of Visual Studio are you using, I used VS2017 Enterprise? I've downloaded the repo and built it where I only needed to change some of your XMMATRIX parameters to XMMATRIX & as passing XMMATRIX will result in an alignment problem but in this case the matrices referred to by the parameters were being recalculated in the function. I had to rebuild using SDK Version 10.0.15063.0 not 10.0.16... (forgot number) as don't have SDK Version 10.0.16.... Could be SDK Version problem?
 
Soldato
Joined
17 Jun 2012
Posts
11,259
Are you sure you linked all needed libraries to the debug version, have to do this seperately for both release and debug.
 
Back
Top Bottom