Multithreaded vs Multithreaded DLL

P

Pradyumna

In Project settins - C/C++ - Code Generation,
what is the difference between the option
"Multithreaded" and "Multithreaded DLL".
I understand that on selecting multithreaded option,
single and multithreaded applications can both use that
dll, but what about multithreaded DLL option.
Thanks
 
S

Stefan Simek

Simple.

When choosing Multithreaded, your application is linked statically with the
libcmt.lib. You are then independent of the msvcrt71.dll.

Using Multithreaded DLL, you link with msvcrt71.dll.

Generally, I would recommend dynamic linking, except for example your own
development utilities and tools, where it's good to have one executable that
links only with system dlls so that you can use it on any machine and don't
need to worry about the dlls. Copying the dll in the executable's directory
is usually sufficent for the application to run.

Hope this helps,
Stefan
 
G

Girish Bharadwaj

Pradyumna said:
In Project settins - C/C++ - Code Generation,
what is the difference between the option
"Multithreaded" and "Multithreaded DLL".
I understand that on selecting multithreaded option,
single and multithreaded applications can both use that
dll, but what about multithreaded DLL option.
Thanks

Multithreaded links to the static CRT library which is multi threaded.
and Multithreaded DLL links to the dll exported symbols.
I have found that you want to use 'multithreaded DLL' almost always when
you are dealing with COM+ components since the runtime also loads
somestuff that will like up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top