Re: /MT and /MD



As "Carl Daniel" explained, with /MT and /MD you choose between LIBCMT (LIBC
for Multi Threaded Apps) and MSVCRT (MS Visual C++ Run Time DLL).

No debug info implied here! Use can use MSVCRT to share runtime code between
apps - makes your apps smaller!)...

If you want to link all runtime code to your app you can use /MT (or /ML if
you aren't using threads). If you don't want all that stuff in your EXE or
DLL, you can use /MD

To link libs with debug info just add another 'd' at the end of the option:
/MTd, /MDd or /MLd.

[]s
Fred

"Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
escreveu na mensagem news:ueuzxCVTGHA.4520@xxxxxxxxxxxxxxxxxxxxxxx
"marco 2" <rebel-6-out@xxxxxxxxx> wrote in message
news:44209ffd$0$2024$ba620dc5@xxxxxxxxxxxxxxxxxxxxxx
are >all< libraries and dll's (which the executable depends upon)
statically linked
into the executable in /MT mode???

No, not at all. /MT vs /MD simply changes the DEFAULTLIB linker directive
that the compiler emits into the object file(s) that tells the linker
which CRT library to link with. Any other libraries are your
responsibility. A given library is either a static library or a DLL
import library - you don't have a choice to link it one way or the other.

-cd




.



Relevant Pages

  • Re: Nasty Problem
    ... There is no dll main as it is not needed. ... The apps generally do not run at the same time. ... I have removed all MessageBox calls in my other app but it still ... what libraries would MessageBox require (implicitly ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Nasty Problem
    ... There is no dll main as it is not needed. ... The apps generally do not run at the same time. ... I have removed all MessageBox calls in my other app but it still crash ... what libraries would MessageBox require (implicitly ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Visual Basic for Autorun?
    ... > Realistically the point is preventing other coders mucking things up ... This is ok but it requires a bit of effort to keep everything in sync between the apps. ... If you don't use ocxs or dll then all of the code has to be loaded all of the time. ... You can move libraries in and out of the IDE just by simply adding and removing them, you get the best of both worlds. ...
    (microsoft.public.vb.general.discussion)
  • Re: /MT and /MD
    ... and MSVCRT (MS Visual C++ Run Time DLL). ... between apps - makes your apps smaller!)... ... To link libs with debug info just add another 'd' at the end of the ... Any other libraries are your ...
    (microsoft.public.vc.language)
  • Re: How to get imagebase after a DLL gets loaded
    ... The main difference between DLL and static library in this context is ... so that it is not meant to be integrated with the client code ... SPEAKING ABOUT STATIC LIBRARIES HERE, AND I *EXPLICITLY* SAID IT THIS ...
    (microsoft.public.win32.programmer.kernel)

Loading