I am compiling a dynamic library containing cpp with cu files with Visual Studio 2013, and I get such errors during linking:
proj_generated_cufile.cu.obj : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in file.obj
libcpmt.lib(ios.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in file.obj
I am not using any additional libraries, and I have already tried to set the Runtime Library in the project preferences -> C/C++ -> Code generation to "Multi-Threaded DLL (/MD)" and under CUDA C/C++ -> Host to "Multi-Threaded DLL (/MD)" or to "inherit from host".
I am generating the project with cmake (with cuda_add_library).
Can it be, that the problem is, that I am trying to compile a dynamic library? What contradicts this assumption is that when I am compiling only the cpp files the compilation succeeds.
Thank you for any suggestion!