hi, gays
When I run the CUDA sdk project called SobelFilter I got a program.
When I compile it, lots of link errors will happen,like below:
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2001: unresolved external symbol "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception@std@@QAE@ABV01@@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::exception::exception(char const * const &)" (??0exception@std@@QAE@ABQBD@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall std::exception::~exception(void)" (??1exception@std@@UAE@XZ) referenced in function "public: virtual __thiscall std::bad_alloc::~bad_alloc(void)" (??1bad_alloc@std@@UAE@XZ)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol __invalid_parameter referenced in function "public: struct bufferConfig & __thiscall std::vector<struct bufferConfig,class std::allocator<struct bufferConfig> >::operator(unsigned int)" (??A?$vector@UbufferConfig@@V?$allocator@UbufferConfig@@@std@@@std@@QAEAAUbufferConfig@@I@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: struct bufferConfig & __thiscall std::vector<struct bufferConfig,class std::allocator<struct bufferConfig> >::operator(unsigned int)" (??A?$vector@UbufferConfig@@V?$allocator@UbufferConfig@@@std@@@std@@QAEAAUbufferConfig@@I@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) referenced in function "public: struct bufferConfig & __thiscall std::vector<struct bufferConfig,class std::allocator<struct bufferConfig> >::operator(unsigned int)" (??A?$vector@UbufferConfig@@V?$allocator@UbufferConfig@@@std@@@std@@QAEAAUbufferConfig@@I@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran@_String_base@std@@SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen@_String_base@std@@SAXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol "public: __thiscall std::exception::exception(void)" (??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol _memcpy_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Copy_s(char *,unsigned int,char const *,unsigned int)" (?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z)
rendercheckgl32D.lib(rendercheck_gl.obj) : error LNK2019: unresolved external symbol _memmove_s referenced in function "public: static char * __cdecl std::char_traits<char>::_Move_s(char *,unsigned int,char const *,unsigned int)" (?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z)
In order to solve this problem, I check the things below, but they are all ok.
rendercheckgl32D.lib has been link in.
The route of head file is right
The route of lib is right
Can you help me?
Thank you
this is a c compling problem, i suggest you read SDk code to see how they do this.
for one possible solution, try declare the functions as “static”