Release build linking error, debug build fine help?

Started by
0 comments, last by Gluc0se 18 years, 8 months ago
Ok i have a program finish and i went to build the release version but i am getting these errors:

msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBC.lib(typinfo.obj)
msvcrt.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 LIBC.lib(typinfo.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _exit already defined in LIBC.lib(crt0dat.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _strncpy already defined in LIBC.lib(strncpy.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fopen already defined in LIBC.lib(fopen.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fgetc already defined in LIBC.lib(fgetc.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _fclose already defined in LIBC.lib(fclose.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: _setvbuf already defined in LIBC.lib(setvbuf.obj)
msvcrt.lib(MSVCR71.dll) : error LNK2005: __isctype already defined in LIBC.lib(isctype.obj)
LIBC.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Release/sdl_main.exe : fatal error LNK1169: one or more multiply defined symbols found

and when i dod have the /NODEFAULTLIB on the release mode i get all these error:

Texture.obj : error LNK2001: unresolved external symbol __fltused
Paddle.obj : error LNK2001: unresolved external symbol __fltused
PongBall.obj : error LNK2001: unresolved external symbol __fltused
sdl_main.obj : error LNK2001: unresolved external symbol __fltused
Shader.obj : error LNK2001: unresolved external symbol __fltused
sdl_main.obj : error LNK2019: unresolved external symbol _memmove referenced in function "public: static char * __cdecl std::char_traits<char>::move(char *,char const *,unsigned int)" (?move@?$char_traits@D@std@@SAPADPADPBDI@Z)
Shader.obj : error LNK2001: unresolved external symbol _memmove
Texture.obj : error LNK2001: unresolved external symbol _memmove
sdl_main.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function "public: void * __thiscall NGraphics::CShader::`scalar deleting destructor'(unsigned int)" (??_GCShader@NGraphics@@QAEPAXI@Z)
Shader.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
Texture.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
sdl_main.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "char * __cdecl std::_Allocate<char>(unsigned int,char *)" (??$_Allocate@D@std@@YAPADIPAD@Z)
Shader.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
Texture.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
sdl_main.obj : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) 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> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
Shader.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Texture.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
sdl_main.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler referenced in function __ehhandler$?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXII@Z
Shader.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler
Texture.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler
sdl_main.obj : error LNK2019: unresolved external symbol __except_list referenced in function "protected: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int,unsigned int)" (?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXII@Z)
Shader.obj : error LNK2001: unresolved external symbol __except_list
Texture.obj : error LNK2001: unresolved external symbol __except_list
sdl_main.obj : error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function $L73833
Shader.obj : error LNK2001: unresolved external symbol __CxxThrowException@8
Texture.obj : error LNK2001: unresolved external symbol __CxxThrowException@8
sdl_main.obj : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) 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)
Shader.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Texture.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
sdl_main.obj : error LNK2019: unresolved external symbol _exit referenced in function _SDL_main
Shader.obj : error LNK2019: unresolved external symbol __Getctype referenced in function "public: struct _Ctypevec __thiscall std::_Locinfo::_Getctype(void)const " (?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ)
Texture.obj : error LNK2001: unresolved external symbol __Getctype
Shader.obj : error LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" (?_Id_cnt@id@locale@std@@0HA)
Texture.obj : error LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" (?_Id_cnt@id@locale@std@@0HA)
Shader.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) referenced in function "protected: void __thiscall std::ctype<char>::_Tidy(void)" (?_Tidy@?$ctype@D@std@@IAEXXZ)
Texture.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
Shader.obj : error LNK2019: unresolved external symbol _free referenced in function "protected: void __thiscall std::ctype<char>::_Tidy(void)" (?_Tidy@?$ctype@D@std@@IAEXXZ)
Texture.obj : error LNK2001: unresolved external symbol _free
Shader.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) referenced in function "public: virtual void * __thiscall std::ios_base::`scalar deleting destructor'(unsigned int)" (??_Gios_base@std@@UAEPAXI@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ)
Shader.obj : error LNK2019: unresolved external symbol "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) referenced in function "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)" (?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z)
Shader.obj : error LNK2001: unresolved external symbol "__int64 std::_Fpz" (?_Fpz@std@@3_JA)
Texture.obj : error LNK2001: unresolved external symbol "__int64 std::_Fpz" (?_Fpz@std@@3_JA)
Shader.obj : error LNK2019: unresolved external symbol "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) referenced in function "public: __thiscall std::ctype<char>::ctype<char>(short const *,bool,unsigned int)" (??0?$ctype@D@std@@QAE@PBF_NI@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ)
Shader.obj : error LNK2019: unresolved external symbol "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) referenced in function "public: __thiscall std::ctype<char>::ctype<char>(short const *,bool,unsigned int)" (??0?$ctype@D@std@@QAE@PBF_NI@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z)
Shader.obj : error LNK2019: unresolved external symbol __Tolower referenced in function "protected: virtual char __thiscall std::ctype<char>::do_tolower(char)const " (?do_tolower@?$ctype@D@std@@MBEDD@Z)
Texture.obj : error LNK2001: unresolved external symbol __Tolower
Shader.obj : error LNK2019: unresolved external symbol __Toupper referenced in function "protected: virtual char __thiscall std::ctype<char>::do_toupper(char)const " (?do_toupper@?$ctype@D@std@@MBEDD@Z)
Texture.obj : error LNK2001: unresolved external symbol __Toupper
Shader.obj : error LNK2001: unresolved external symbol "long const std::_BADOFF" (?_BADOFF@std@@3JB)
Texture.obj : error LNK2001: unresolved external symbol "long const std::_BADOFF" (?_BADOFF@std@@3JB)
Shader.obj : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
Shader.obj : error LNK2001: unresolved external symbol "public: __thiscall bad_cast::bad_cast(class bad_cast const &)" (??0bad_cast@@QAE@ABV0@@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall bad_cast::bad_cast(class bad_cast const &)" (??0bad_cast@@QAE@ABV0@@Z)
Shader.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
Texture.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
Shader.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall bad_cast::~bad_cast(void)" (??1bad_cast@@UAE@XZ)
Texture.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall bad_cast::~bad_cast(void)" (??1bad_cast@@UAE@XZ)
Shader.obj : error LNK2019: unresolved external symbol "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ)
Shader.obj : error LNK2019: unresolved external symbol "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z)
Shader.obj : error LNK2019: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) referenced in function "class std::ctype<char> const & __cdecl std::use_facet<class std::ctype<char> >(class std::locale const &)" (??$use_facet@V?$ctype@D@std@@@std@@YAABV?$ctype@D@0@ABVlocale@0@@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z)
Shader.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id std::ctype<char>::id" (?id@?$ctype@D@std@@2V0locale@2@A)
Texture.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id std::ctype<char>::id" (?id@?$ctype@D@std@@2V0locale@2@A)
Shader.obj : error LNK2019: unresolved external symbol "public: __thiscall std::locale::locale(void)" (??0locale@std@@QAE@XZ) referenced in function "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ)
Texture.obj : error LNK2001: unresolved external symbol "public: __thiscall std::locale::locale(void)" (??0locale@std@@QAE@XZ)
Shader.obj : error LNK2019: unresolved external symbol _setvbuf referenced in function "protected: virtual class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::setbuf(char *,int)" (?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z)
Texture.obj : error LNK2001: unresolved external symbol _setvbuf
Shader.obj : error LNK2019: unresolved external symbol _fflush referenced in function "protected: virtual int __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::sync(void)" (?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ)
Texture.obj : error LNK2001: unresolved external symbol _fflush
Shader.obj : error LNK2019: unresolved external symbol _ungetc referenced in function "protected: virtual int __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::pbackfail(int)" (?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z)
Texture.obj : error LNK2001: unresolved external symbol _ungetc
Shader.obj : error LNK2019: unresolved external symbol "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ) referenced in function "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::init(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z)
Texture.obj : error LNK2001: unresolved external symbol "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ)
Shader.obj : error LNK2019: unresolved external symbol "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) referenced in function "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::init(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z)
Texture.obj : error LNK2001: unresolved external symbol "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ)
Shader.obj : error LNK2019: unresolved external symbol "struct _iobuf * __cdecl std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z) referenced in function "public: class std::basic_filebuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::open(char const *,int,int)" (?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z)
Texture.obj : error LNK2001: unresolved external symbol "struct _iobuf * __cdecl std::_Fiopen(char const *,int,int)" (?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z)
Shader.obj : error LNK2019: unresolved external symbol _fgetc referenced in function "protected: virtual int __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::uflow(void)" (?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ)
Texture.obj : error LNK2001: unresolved external symbol _fgetc
Shader.obj : error LNK2019: unresolved external symbol _fwrite referenced in function "protected: bool __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Endwrite(void)" (?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ)
Texture.obj : error LNK2001: unresolved external symbol _fwrite
Shader.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function "protected: bool __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Endwrite(void)" (?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ)
Texture.obj : error LNK2001: unresolved external symbol ___security_cookie
Shader.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "protected: bool __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::_Endwrite(void)" (?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ)
Texture.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
Shader.obj : error LNK2019: unresolved external symbol _fputc referenced in function "protected: virtual int __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::overflow(int)" (?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z)
Texture.obj : error LNK2001: unresolved external symbol _fputc
Shader.obj : error LNK2019: unresolved external symbol _fgetpos referenced in function "protected: virtual class std::fpos<int> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(long,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z)
Texture.obj : error LNK2001: unresolved external symbol _fgetpos
Shader.obj : error LNK2019: unresolved external symbol _fseek referenced in function "protected: virtual class std::fpos<int> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekoff(long,int,int)" (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z)
Texture.obj : error LNK2001: unresolved external symbol _fseek
Shader.obj : error LNK2019: unresolved external symbol _fsetpos referenced in function "protected: virtual class std::fpos<int> __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::seekpos(class std::fpos<int>,int)" (?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z)
Texture.obj : error LNK2001: unresolved external symbol _fsetpos
Shader.obj : error LNK2019: unresolved external symbol _fclose referenced in function "public: class std::basic_filebuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::close(void)" (?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ)
Texture.obj : error LNK2001: unresolved external symbol _fclose
Shader.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) referenced in function "public: char * __thiscall NGraphics::CShader::ReadShaderFile(char const *)" (?ReadShaderFile@CShader@NGraphics@@QAEPADPBD@Z)
Texture.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
Texture.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall exception::~exception(void)" (??1exception@@UAE@XZ) referenced in function "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ)
Texture.obj : error LNK2019: unresolved external symbol "public: __thiscall exception::exception(void)" (??0exception@@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)
Texture.obj : error LNK2019: unresolved external symbol _atexit referenced in function _$E1
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
Release/sdl_main.exe : fatal error LNK1120: 51 unresolved externals

what do i have to do inorder to get the release mode to compile? I have using SDL, OpenGL, and Glew 3rd party libraries, are the different thing i have to do or libraries have to include when doing release with those of something?
Advertisement
Chances are you need to go under C++ and Code Generation (I think its there). Look for the Run time library. Change it to Multithreaded DLL from Single Threaded.

That should do the trick I hope.

This topic is closed to new replies.

Advertisement