maverick1013
D3D12 requires you to compile as C++, since we have to deal with the COM (Component Object Model) stuff
This is not true. Any Microsoft COM stuff compiles as C code. This is by design. This includes D3D9, D3D11, D3D12 and all other COM API's.
COM declarations always generate code that works for both C and C++ code.
For example if in C++ you need to do this:
| IObject* obj;
obj->Call(arg1);
|
Then in C you need to do this:
| IObject* obj;
obj->vtbl->Call(obj, arg1);
|
This works for all COM classes.
It gets even better. If you do #define COBJMACROS before any of windows includes, then you get access to nice C macros, which you use like this:
| IObject* obj;
IObject_Call(obj, arg1);
|
For IID/CLSID stuff - as marcc already said - they all are available in header files. That's also standard COM stuff, nothing special for D3D12.
Sometimes though the IID's are only declared, and do not have corresponding static .lib library to link to. No idea why they do that, but you can fix it by including <initguid.h> header file as first include (before any windows header). This will make all IID_* variables to be defined in header files, not only declared.
Clang supports __uuidof just fine (in C++ mode).