identifier iUnknown

Hi,

I wondered if anybody could help, I’m compiling a cuda program with Visual Studio 2013, Windows 10 SDK and with DirectX 11 interop. components. (64bit) Cuda 7.5. (C++)

I’ve written a simple Thrust sort wrapper class and placed in a .cu file.

All compiles well until I add the include directory from the Windows SDK 10 C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um into the project properties, and then I get the following error;

1>combaseapi.h(234): error : identifier “IUnknown” is undefined

Which leaves me stumped, any ideas on a workaround, anybody else experienced this? I was wondering if there was an issue with the latest version of the Win SDK.

Regards Phill.

Hi,

Try adding following 2 includes in combasapi.h before line234 to see whether can help.
#include <wtypes.h>
#include <unknwn.h>

Thanks,

I add
if (WIN32)
ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
endif (WIN32)
to the CMakeList.txt in the failing modules.
To get the failing modules untick the world module in CMake

opencv_cudafeatures2d
opencv_cudaimgproc