We developed our code on Linux, but would like to compile the Windows executable. The old version of non-gpu compiles using mingw on Windows, so I was hoping I could do the same with the CUDA version.
The strategy is to compile the kernel code with nvcc in visual studio, and the rest with gcc in mingw.
So far, we have easily compiled a .cu file (with kernel and kernel running) in visual studio. However, we still cannot compile the c code in mingw. The c code contains cuda api calls like cudaMalloc and cudaMalloc types like cudaEvent_t , so we need to include cuda.h and cuda_runtime.h. However, gcc gives warnings and errors for these headers, for example:
../include/host_defines.h:57:0: warning: "__cdecl" redefined
and
../include/vector_functions.h:127:14: error: 'short_4' has no member named 'x'
Any ideas on how we can include these headers and compile the c-part of the code?
source share