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

Teeter, Chuck cteeter at Suncor.com
Wed Sep 22 17:47:45 EDT 2010


Sorry for the confusion on the VS2008 General Notes.  I should have use '/MTd' rather than '/MD' for the static debug version of Ipopt.  My main point was to avoid the mixing of release and debug runtimes as Damien mentions below.

________________________________
From: ipopt-bounces at list.coin-or.org [mailto:ipopt-bounces at list.coin-or.org] On Behalf Of Damien
Sent: Wednesday, September 22, 2010 3:20 PM
To: ipopt at list.coin-or.org
Subject: Re: [Ipopt] IPOpt windows binaries runtime libs: /MT /MTd /MD /MDd

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<mailto:Ipopt at list.coin-or.org>
http://list.coin-or.org/mailman/listinfo/ipopt

------------------------------------------------------------------------
This email and its contents are private and confidential, for the sole use of the addressees. If you are not an intended recipient, copying, forwarding or other distribution of this email or its contents by any means is prohibited. If you believe that you received this email in error please notify the original sender immediately. 

Petro-Canada is a Suncor Energy business.

------------------------

Ce courriel et son contenu sont privés et confidentiels, et sont destinés à l’usage exclusif des destinataires. Si vous n'êtes pas le destinataire prévu, toute reproduction, transfert ou autre forme de diffusion de ce courriel ou de son contenu par quelque moyen que ce soit est interdit. Si vous croyez avoir reçu ce courriel par erreur, veuillez en aviser l'expéditeur original immédiatement. 

Petro-Canada est une entreprise de Suncor Énergie.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20100922/95f3c0c2/attachment-0001.html 


More information about the Ipopt mailing list