How can I choose the VC Runtime Library

  • Thread starter Thread starter Qiang.Meng
  • Start date Start date
Q

Qiang.Meng

I'm using Visual C++ 2005 to build a lib.

I found that there were 4 runtime libraries in the VC2005, /MD, /MT, /
MDd, /MTd. Which one should I choose to ensure that my library can be
used by all the other /MD or /MT programs?

Thanks a lot!
 
I'm using Visual C++ 2005 to build a lib.
I found that there were 4 runtime libraries in the VC2005, /MD, /MT, /
MDd, /MTd. Which one should I choose to ensure that my library can be
used by all the other /MD or /MT programs?

It depends on what your library (I presume you mean it's a DLL)
interface uses.

If it relies on passing 'C' run-time/heap allocated parameters across
the DLL/EXE boundary, your only option is to use the DLL version of
the run-time. This will tie your users down to the same version of the
tools that you have. If your interface only passes plain old data
types, it doesn't particularly have a bearing - in which case I'd
probably use the static version unless I knew a close tie in with the
users of the library would always exist and they were shipping the DLL
run-time.

Dave
 
Back
Top