Discussion:
Change Multi threaded DLL to Multi threaded
(too old to reply)
Mike H.
2009-05-30 10:21:27 UTC
Permalink
Hi,

If I redistribute an app which is built with the "Multi threaded DLL"
option (windows), can I be sure that the user has all the necessary
run-time DLL files on his/her computer?

I want to build the calendar sample as a Multi threaded instead of Multi
threaded DLL, to get rid of run-time dll depencies.

When I change the code generation setting in MS Visual C++ 2008 Express
Ddition to Multi threaded, I get lots of link errors, for example:

Error 1 error LNK2005: _free already defined in
LIBCMTD.lib(dbgfree.obj) MSVCRTD.lib
Error 2 error LNK2005: _tolower already defined in
LIBCMTD.lib(tolower.obj) MSVCRTD.lib
Error 3 error LNK2005: _isalnum already defined in
LIBCMTD.lib(_ctype.obj) MSVCRTD.lib
Error 4 error LNK2005: _malloc already defined in
LIBCMTD.lib(dbgmalloc.obj) MSVCRTD.lib
Error 5 error LNK2005: _strchr already defined in
LIBCMTD.lib(strchr.obj) MSVCRTD.lib

I've tried adding LIBCMTD.lib as a library to ignore, but there are
still errors. Any clue?

/Mike
Sebastian Krämer
2009-05-30 10:42:57 UTC
Permalink
Post by Mike H.
Hi,
If I redistribute an app which is built with the "Multi threaded DLL"
option (windows), can I be sure that the user has all the necessary
run-time DLL files on his/her computer?
The redistributable vc++ dlls aren't part of a standard windows install
so usually, a user's computer won't have them I think.
I don't know of a method to catch that error on startup. When I started
an application on a computer without the redest., it crashed instantly,
no warning and no descriptive error message.. (I'd be interested in a
way to circumwent that.)
Post by Mike H.
I want to build the calendar sample as a Multi threaded instead of Multi
threaded DLL, to get rid of run-time dll depencies.
When I change the code generation setting in MS Visual C++ 2008 Express
...
If you want to link msvcrt statically, *all* build dependencies have to
be built with the same configuration; in your case that means that
wxwidgets itself must be built with statically linked msvcrt.. at least
I think so. I didn't try that myself yet.


Sebastian

Continue reading on narkive:
Loading...