I am trying to compile a C++ DLL with VC++2008. I already compiled it correctly with VC++2010, but with VC++2008, I get the following error:
1>msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: unsigned short * __cdecl std::allocator<unsigned short>::allocate(unsigned __int64)" (?allocate@?$allocator@G@std@@QEAAPEAG_K@Z) already defined in cuda.obj
1>msvcprt.lib(MSVCP90.dll) : error LNK2005: "public: unsigned short * __cdecl std::allocator<unsigned short>::allocate(unsigned __int64)" (?allocate@?$allocator@G@std@@QEAAPEAG_K@Z) already defined in cuda.obj
cuda.obj
is compiled using nvcc
, but as far as I can tell, I gave nvcc the exact same compiler options than for the other files.
What can I do, and where could this error come from?