Home > Archive > VC Language > January 2006 > DLLs
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| bob@coolgroups.com 2006-01-25, 4:17 am |
| 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.
| |
| Victor Bazarov 2006-01-25, 4:17 am |
| bob@ groups.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
| |
| Alex Blekhman 2006-01-25, 7:23 pm |
| bob@ groups.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"
| |
| Brian Muth 2006-01-25, 7:23 pm |
| 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
| |
| bob@coolgroups.com 2006-01-25, 7:23 pm |
| 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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@DU?$char_traits@D@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(v
oid)"
(??1_Container_base@std@@QAE@XZ) already defined in
msvcprtd.lib(MSVCP80D.dll)
comdemo.obj : error LNK2005: "public: __thiscall
std::_Container_base::_Container_base(vo
id)"
(??0_Container_base@std@@QAE@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@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@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
| |
| Victor Bazarov 2006-01-25, 7:23 pm |
| Brian Muth wrote:
> 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.
I think that's only true if he doesn't use any third-party static
libraries that were compiled with /MD or some such, or third-party
dynamic libraries.
V
| |
| John Carson 2006-01-25, 9:59 pm |
| <bob@ groups.com> wrote in message
news:1138218177.172533.61590@g47g2000cwa.googlegroups.com[color=darkred]
> 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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@DU?$char_traits@D@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(v
oid)"
> (??1_Container_base@std@@QAE@XZ) already defined in
> msvcprtd.lib(MSVCP80D.dll)
> comdemo.obj : error LNK2005: "public: __thiscall
> std::_Container_base::_Container_base(vo
id)"
> (??0_Container_base@std@@QAE@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@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@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@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)[
/color]
Try doing a Rebuild Solution. That should get rid of at least some of the
errors.
--
John Carson
| |
| bob@coolgroups.com 2006-01-26, 4:03 am |
| "Rebuild Solution" did get rid of some of them, but these are still
there:
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@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@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
| |
| John Carson 2006-01-26, 4:03 am |
| <bob@ groups.com> wrote in message
news:1138250145.677320.130090@g43g2000cwa.googlegroups.com[color=darkred]
> "Rebuild Solution" did get rid of some of them, but these are still
> there:
>
> 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@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@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)[
/color]
Wild guess: are you using /MT in debug mode? You should use /MTd for debug
mode and /MT for release mode.
--
John Carson
|
|
|
|
|