You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error compiling 4.1.0 source code with mingw-w64: 'D3D11_TEXTURE2D_DESC' was not declared in this scope #14286
When I compiled the 4.1.0 version with mingw-w64, there was an error
E:\opencv-4.1.0\opencv-4.1.0\modules\core\src\directx.cpp:1035:5: error: 'D3D11_TEXTURE2D_DESC' was not declared in this scope
D3D11_TEXTURE2D_DESC desc = { 0 };
^~~~~~~~~~~~~~~~~~~~
I can solve it like this
cmake -DWITH_OPENCL_D3D11_NV=OFF
But I don't know if this is the right solution, and whether this will affect the compiled dll.
D3D11_TEXTURE2D_DESC is declared in d3d11.h. If you don't need interoperability between D3D11 and OpenCL, you can turn off compile options, as you did.
Activity
Mainvooid commentedon Apr 9, 2019
D3D11_TEXTURE2D_DESCis declared ind3d11.h. If you don't need interoperability between D3D11 and OpenCL, you can turn off compile options, as you did.alalek commentedon Apr 9, 2019
Need to ensure that
HAVE_OPENCL_D3D11_NVbecome disabled ifHAVE_DIRECTX=OFF.Main problem here is that DirectX checks are performed after OpenCL checks.
huihut commentedon Apr 10, 2019
OK, I configured
WITH_OPENCL=ONWITH_OPENCL_D3D11_NV=OFFWITH_DIRECTX=ONIt can be successfully compiled.
If there is no problem, I close this issue.
alalek commentedon Apr 10, 2019
@huihut Could you check this patch: #14294 ? (with default CMake parameters)
huihut commentedon Apr 11, 2019
@alalek Well, this can be successfully compiled without modifying the default
WITH_OPENCL_D3D11_NV.