[gdal-dev] /MD vs /MDd for DEBUG MSVC builds

Even Rouault even.rouault at spatialys.com
Wed Sep 27 15:11:12 PDT 2017


On mercredi 27 septembre 2017 19:05:12 CEST Jeff McKenna wrote:
> On 2017-09-27 4:38 PM, Even Rouault wrote:
> > Hi,
> > 
> > For those who don't understand the title, you may skip this email ;-)
> > 
> > Once again someone raised an issue about the MSVC runtime we use for
> > DEBUG=1 builds:
> > 
> > https://trac.osgeo.org/gdal/ticket/7059
> > 
> > and in https://trac.osgeo.org/gdal/ticket/6384 about the same issue,
> > there are 4 similar tickets raised.
> > 
> > So it seems our default is a recurring problem.
> > 
> > Personnaly I believe I've never used a Windows build, so I'm mostly
> > indifferent
> > 
> > Any opinion about using the debug MSVC runtime (/MDd) for DEBUG=1 builds
> > instead of the current release runtime (/MD) ?
> > 
> > Even
> 
> The fix proposed in ticket 7059 makes sense, I see the problem here in
> my local nmake, so +1
> 
> But I don't understand Mateusz's response.  I think the change in ticket
> 7059 should be made, and no changes to any defaults, because packagers
> by default are not sharing default builds.  Again, maybe I am
> misunderstanding Mateusz's message.
> 

So things are clear, I was thinking to this change


$ svn diff nmake.opt
Index: nmake.opt
===================================================================
--- nmake.opt	(revision 40206)
+++ nmake.opt	(working copy)
@@ -132,13 +132,13 @@
 !IFNDEF DEBUG
 OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
 !ELSE
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
 !ENDIF
 !ELSE
 !IFNDEF DEBUG
 OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG
 !ELSE
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MDd /EHsc /GR /FC /DDEBUG
 !ENDIF
 !ENDIF  #MSVC_VER
 !ENDIF  # OPTFLAGS


(ah and I mistyped my initial message. I have sometimes done Windows builds,
just not *debug* builds)


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170928/4d69a999/attachment.html>


More information about the gdal-dev mailing list