I am trying to cross compile icd loader lib for an opencl application using mingw. The build system is running on cent os 7. I want the app to run on linux and windows systems. I am using the OpenCL 1.2 headers from Khronos and the respective icd loader lib from Khronos.
However i get the following error:
x86_64-w64-mingw32-gcc -o icd_dispatch.o -c -m64 -O3 -DOpenCL_EXPORTS -Wall -W -Wno-long-long -Iinc icd_dispatch.c In file included from icd_dispatch.h:62:0, from icd_dispatch.c:41: inc/CL/cl_dx9_media_sharing.h:37:1: warning: "/*" within comment [-Wcomment] /* cl_khr_dx9_media_sharing */ ^ icd_dispatch.c:2039:1: error: conflicting types for 'clGetDeviceIDsFromDX9MediaAdapterKHR' clGetDeviceIDsFromDX9MediaAdapterKHR( ^ In file included from icd_dispatch.c:41:0: icd_dispatch.h:985:1: note: previous declaration of 'clGetDeviceIDsFromDX9MediaAdapterKHR' was here clGetDeviceIDsFromDX9MediaAdapterKHR( ^
x86_64-w64-mingw32-gcc --version x86_64-w64-mingw32-gcc (GCC) 4.9.1 20140716 (Fedora MinGW 4.9.1-3.el7) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The linux version which does not contain dx9media sharing compiles fine.
Does anyone have a suggestion whats going wrong?