I have been having some strange(at least to me) linking problems.
I just created new cuda project, deleted everything from kernel.cu file, created new main.cpp file, created there main function with console output, nothing more. When I compile it I get linking errors.
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: “private: __thiscall type_info::type_info(class type_info const &)” (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: “private: class type_info & __thiscall type_info::operator=(class type_info const &)” (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib ‘MSVCRTD’ conflicts with use of other libs; use /NODEFAULTLIB:library
Also, I made some simple random generator with cuda, but when I compile it, I get this same linking error. If I exclude cuda kernel from project, compile, get error about it missing, include it back, than it compiles fine. Once I restart visual studio 2008, I will get this linking errors again. (I do not include kernel file itself, instead I made header file for it which I include).
What can be wrong? Thanks in advance.