[Ipopt] IPOpt windows binaries runtime libs: /MT /MTd /MD /MDd

Damien damien at khubla.com
Wed Sep 22 17:20:28 EDT 2010


  Justin,

/MD means link for the C/C++ release, runtime dlls (msvc... dlls etc).  
/MDd means link for the C/C++ debug, runtime dll (msvc...d dlls).  /MT 
means link the C/C++ release, runtime static library (libc.... libs 
etc).  /MTd means link the C/C++ debug, runtime static library (libc...d 
libs).

If the notes say release is /MT and debug is /MD, that's linking static 
release libraries on a release build, and dynamic release dlls on a 
debug build.  That's a bit unusual, and won't always work well on a 
debug build, depending on how exceptions or errors are handled.

It's generally not a good idea to mix debug and release runtimes, and 
sometimes you can get weird link errors mixing static lib and dll 
runtimes, so use only /MT or only /MD everywhere for release, and only 
/MTd or only /MDd everywhere for debug.  You can't control what third 
parties do with their code though.  I generally do /MD or /MDd for the 
runtimes, because the dll is only loaded once, no matter how many times 
it's linked to from anyone's library.

Damien

On 21/09/2010 9:56 AM, Vallon, Justin wrote:
>
> The wiki https://projects.coin-or.org/Ipopt/wiki/CompilationHints ... 
> Windows VS2008 ... General Notes says that release binaries are built 
> with /MT and debug are built with /MD.
>
> For debug C++ code, shouldn't I be using /MDd or /MTd in my 
> application?  Can I mix my /MTd or /MDd code with Ipopt /MD?
>
> I looked at the win32/debug/Ipopt.dll, and I don't see a dependency on 
> any VS DLLs.  Maybe debug is /MTd?
>
> -- 
>
> -Justin
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20100922/6f28f222/attachment.html 


More information about the Ipopt mailing list