Link Error (VS2005) MSVCRT.lib(MSVCR80.dll) vs. LIBCMT.lib

Hi all,

when I build my CUDA application I got this link error:

“MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)”

I know that other libs I use in my project are linked against MSVCRT.lib(MSVCR80.dll). The question is which CUDA libs are linked against LIBCMT.lib? Perhaps cuda.dll or cudart.dll?

I build cutil32.dll with the compiler option “Multi-threaded DLL (/MD)”. But this doesn’t solved my problem.

Does someone has an idea?

Thanks and best regards,
Christoph

The libraries I used for linking are cudart.lib cutil32.lib. Not sure how you link dll in the project. If the confliction happened try use /IGNORE: xx.lib. (I would expect to see a lot of undefined symbol in that case :P )