Multithreaded vs Multithreaded DLL

  • Thread starter Thread starter Pradyumna
  • Start date Start date
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
 
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
 
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.
 
Back
Top