Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change Multi threaded DLL to Multi threaded

5 views
Skip to first unread message

Mike H.

unread,
May 30, 2009, 6:21:27 AM5/30/09
to
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

unread,
May 30, 2009, 6:42:57 AM5/30/09
to
Mike H. wrote:
> 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.)


> 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:

> ...

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

0 new messages