[EDIT] This is about a vsCode project not a visual studio project (clarified here because it is not obvious)
Did anyone managed to build an app that includes d3d12.h and links successfully with the D3D lib. I know it lives in C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um But when I add it to the include paths of c_cpp_properties.json I get this error:
cannot open source file "kernelspecs.h" (dependency of "d3d12.h")
Which makes sense.
This page mentions a DXSDK_DIR environment var but it is not defined on my computer although I have "Windows 10 SDK software" and "VS community 2017" installed. https://docs.microsoft.com/en-us/windows/desktop/direct3d12/directx-12-programming-environment-set-up
I have the impression it is impossible to build a D3D12 App with VSCode right now. Am I wrong ?
[Edit] Okay so I added all four include paths in this way (I am using g++):
"command": "${env:Cygwin64BinPath}/g++.exe",
"args":
[
"-g",
"-o", "MassiveSteering",
"*.cpp",
"-D_DEBUG",
"-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared",
"-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um",
"-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt",
"-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/cppwinrt"
],
But I get the following error:
Executing task: C:\cygwin64\bin/g++.exe -g -o MassiveSteering *.cpp -D_DEBUG '-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared' '-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um' '-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt' '-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/cppwinrt' <
In file included from C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared/minwindef.h:182:0,
from C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared/windef.h:24,
from C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um/windows.h:171,
from main.cpp:7: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um/winnt.h:154:2: error: #error "No Target Architecture"
The only thing in my only cpp is :
#define UNICODE // Necessary to use long chars in windows
#define _UNICODE
#define WIN32_LEAN_AND_MEAN
// include the basic windows header file
#include <windows.h>