[gdal-dev] /MD vs /MDd for DEBUG MSVC builds
Tamas Szekeres
szekerest at gmail.com
Mon Oct 16 14:01:52 PDT 2017
Looks like I've missed this thread earlier, but according to this change we
might either compile all the dependent libraries for /MDd (at least for the
statically linked libraries) or we trust in that GDAL is safe to compile
against a different CRT than the dependencies. That means that GDAL won't
free up memory that have been allocated in either of the dependencies or
vica versa. I'm not completely sure if the latter applies.
The earlier approach was a bit more like the RelWithDebInfo setting in the
cmake terminology which is not considered as a wrong setting, but that has
it's own purpose. At the moment I'm not aware of any binary distributions
or SDKs out of the box which would be compatible with the /MDd setting,
that causes that DEBUG=1 has a fairly limited usability from now on.
Best regards,
Tamas
2017-09-28 12:05 GMT+02:00 Even Rouault <even.rouault at spatialys.com>:
> Hi,
>
>
>
> Given the feedback, I've just committed the below change (in trunk only)
>
>
>
> Even
>
>
>
> >
>
> > $ 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
>
> >
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171016/a9dbc252/attachment.html>
More information about the gdal-dev
mailing list