Clang-cl build error
Hello,
I'm building NoesisApp for Windows using clang-cl, and everything works well except for a minor issue that's trivial to fix. Here's how to reproduce it:
The fix is simply to explicitly use a static cast:
I'm building NoesisApp for Windows using clang-cl, and everything works well except for a minor issue that's trivial to fix. Here's how to reproduce it:
- In the NoesisGUI native SDK for Windows (3.2.7), open NoesisApp-vs2022.vcxproj.
- In the project properties, set the Platform Toolset to LLVM (clang-cl) and Treat Warnings as Errors to No.
- Build the project. You will encounter the following error: Code: Select all
expected '(' for function-style cast or type construction (Src\Packages\Render\D3D11RenderDevice\Src\D3D11RenderDevice.cpp, 199)
Code: Select all
viewDesc.Texture2D.MipLevels = unsigned int(-1);Code: Select all
viewDesc.Texture2D.MipLevels = static_cast<unsigned int>(-1);Re: Clang-cl build error
Thanks for reporting! I will fix this
Re: Clang-cl build error
Fixed it like this:
Code: Select all
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
viewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
viewDesc.Texture2D.MipLevels = (UINT)(-1);
viewDesc.Texture2D.MostDetailedMip = 0;
Who is online
Users browsing this forum: No registered users and 7 guests