-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed a couple of build-related issues when using clang #96
base: main
Are you sure you want to change the base?
Conversation
src/d3dx12_property_format_table.cpp
Outdated
@@ -20,10 +20,10 @@ | |||
#ifndef _WIN32 | |||
#include <wsl/winadapter.h> | |||
#endif | |||
#include "d3dx12_property_format_table.h" | |||
#include <directx/d3dx12_property_format_table.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang failed with stderr: C:\code\cpp\DirectX-Headers\src\d3dx12_property_format_table.cpp:23:10: fatal error: 'd3dx12_property_format_table.h' file not found
I've no idea how this compiled for you guys, but that's definitely not right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/d3dx12_property_format_table.cpp
Outdated
#include <assert.h> | ||
#include <algorithm> | ||
#include "D3D12TokenizedProgramFormat.hpp" | ||
#include <directx/D3D12TokenizedProgramFormat.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's for consistency.
@@ -31,7 +31,7 @@ int main() | |||
check_uuid_linkage(); | |||
{ | |||
IDXCoreAdapterFactory *factory = nullptr; | |||
if (FAILED(DXCoreCreateAdapterFactory(&factory))) | |||
if (FAILED(DXCoreCreateAdapterFactory(IID_PPV_ARGS(&factory)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang failed with stderr: C:\code\cpp\DirectX-Headers\test\test.cpp:34:20: error: no matching function for call to 'DXCoreCreateAdapterFactory'
That's probably not the intended way of doing things, but the intended way does not compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be calling into:
https://github.com/microsoft/DirectX-Headers/blob/main/include/directx/dxcore.h#L27
One more thing, the two test files in the test folder do not work because the DirectX core is not supported by either MinGW or clang. Is this intentional? |
@microsoft-github-policy-service agree |
MinGW support is best-effort. Note that MinGW uses a reverse-engineered version of the Windows SDK with a GPL license, so as contributors to the actual Windows SDK, that really ties our hands. I couldn't tell you what the deal is with MinGW support for DXCore, but it's a Windows API and so compilers targeting Windows should be able to use it. |
I'll come back to this PR sometime this week, as I'm a bit busy at the moment. As far as I can see, dxcore.lib is in the um/x64 directory (talking about Windows Kits here), so providing the linker with the path to that place should do the trick, but for some as yet unknown reason, it does not. I'll also answer your comments later as I have a few questions. |
Specifically for LLVM 14.