|
Prev: Question about Deprecated Functions
Next: xp error
From: bob on 24 Jan 2006 23:15 I wrote and compiled a program with VC++ 8.0 Express. Then I tried it on another PC with Win 2k. It said it needed msvcp80.dll. So, I included that. I tried again, and it said it now wants msvcr80.dll. Anyone know what's up with all this? Is there a standard set of DLLs that I should be including with all my VC++ 8.0 Express programs to ensure compatibility? Thanks.
From: Victor Bazarov on 25 Jan 2006 00:18 bob(a)coolgroups.com wrote: > I wrote and compiled a program with VC++ 8.0 Express. Then I tried it > on another PC with Win 2k. It said it needed msvcp80.dll. So, I > included that. I tried again, and it said it now wants msvcr80.dll. > Anyone know what's up with all this? Is there a standard set of DLLs > that I should be including with all my VC++ 8.0 Express programs to > ensure compatibility? You can find it by running 'depend' utility. Also, look on MSoft's site for "redistributable dlls" or something. They gotta have them listed. V
From: Alex Blekhman on 25 Jan 2006 10:33 bob(a)coolgroups.com wrote: > I wrote and compiled a program with VC++ 8.0 Express. > Then I tried it on another PC with Win 2k. It said it > needed msvcp80.dll. So, I included that. I tried again, > and it said it now wants msvcr80.dll. Anyone know what's > up with all this? Is there a standard set of DLLs that I > should be including with all my VC++ 8.0 Express programs > to ensure compatibility? 1. As Victor suggested, use Depends utility to find out which DLLs you need. 2. Consider appropriate deployment strategy for your application: "Deployment" http://msdn2.microsoft.com/en-us/library/zebw5zk9(en-US,VS.80).aspx Redist package for x86 can be found here: "%VSINSTALLDIR%\SDK\v2.0\BootStrapper\Packages\vcredist_x86" On my PC %VSINSTALLDIR% = "C:\Program Files\Microsoft Visual Studio 8"
From: Brian Muth on 25 Jan 2006 13:30 To add to the other replies, you can also use the /MT compiler switch to indicate that you want to statically link to your libraries. This will incorporate the runtime library code directly into your application so you don't have any dependencies at all. Brian
From: bob on 25 Jan 2006 14:42
When I use the /MT compiler switch, I get a lot of errors: Linking... comdemo.obj : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string(a)DU?$char_traits@D(a)std@@V?$allocator@D@2@@std@@QAE(a)ABV01@@Z) already defined in msvcprtd.lib(MSVCP80D.dll) comdemo.obj : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string(a)DU?$char_traits@D(a)std@@V?$allocator@D@2@@std@@QAE(a)XZ) already defined in msvcprtd.lib(MSVCP80D.dll) comdemo.obj : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string(a)DU?$char_traits@D(a)std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in msvcprtd.lib(MSVCP80D.dll) comdemo.obj : error LNK2005: "public: __thiscall std::_Container_base::~_Container_base(void)" (??1_Container_base(a)std@@QAE(a)XZ) already defined in msvcprtd.lib(MSVCP80D.dll) comdemo.obj : error LNK2005: "public: __thiscall std::_Container_base::_Container_base(void)" (??0_Container_base(a)std@@QAE(a)XZ) already defined in msvcprtd.lib(MSVCP80D.dll) comdemo.obj : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string(a)DU?$char_traits@D(a)std@@V?$allocator@D@2@@std@@QAE(a)PBD@Z) already defined in msvcprtd.lib(MSVCP80D.dll) LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library comdemo.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "wchar_t * __cdecl A2WBSTR(char const *,int)" (?A2WBSTR@@YAPA_WPBDH@Z) libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2(a)YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3(a)YAXPAXABU_DebugHeapTag_t@std@@PADH@Z) |