[gdal-dev] Win32 Default Build Options

Lucena, Ivan ivan.lucena at pmldnet.com
Mon Feb 4 15:48:48 EST 2008


Frank,

I tested the GDAL build process on VC8 (VS2005) and all went well, but 
with no "/GR", if that was what you expected.

Example:

     cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE 
/D_CRT_NONSTDC_NO_DE PRECATE /DNDEBUG -I..\..\port -I..\..\ogr 
-I..\..\gcore  -I..\..\alg /c bmpdataset.cpp

I will check the other issues as they come along my way.


I have a suggestion, I believe that most of us usually place all the 
FOSS projects in the same root folder, so it should be interesting to 
have a variable for that on nmake.opt, like:

DEV_HOME = C:\FOSS\

So, in all those place with "C:/warmerda" we should have $(DEV_HOME) 
instead:

C:\FOSS\gdal>grep warmerda nmake.opt
File nmake.opt:
# $Id: nmake.opt 13667 2008-02-02 06:41:24Z warmerdam $
GDAL_HOME = "C:\warmerda\bld"
#TIFF_INC =     -Ic:/warmerda/libtiff/libtiff
#TIFF_LIB =     c:/warmerda/libtiff/libtiff/libtiff_i.lib
#GEOTIFF_INC =   -Ic:/warmerda/libgeotiff -Ic:/warmerda/libgeotiff/libxtiff
#GEOTIFF_LIB =   C:/warmerda/libgeotiff/geotiff_i.lib
#ECWDIR  =      C:\warmerda\libecwj2-3.3
#DWGDIRECT=C:\warmerda\DWGdirect
#OGDIDIR =      D:\warmerda\iii\devdir
#XERCES_DIR =   c:\warmerda\supportlibs\xerces-c_2_6_0
#KAKDIR =       D:\warmerda\jp2\kakadu
#HDF4_DIR =     D:\warmerda\HDF41r5
#HDF5_DIR =     c:\warmerda\supportlibs\hdf5\5-164-win
#SZIP_DIR =      c:\warmerda\supportlibs\hdf5\szip20
#GEOS_DIR=C:/warmerda/geos

Not a big deal, just a suggestion.

Regards,

Ivan

Frank Warmerdam wrote:
> Folks,
> 
> I spent some very frustrating hours trying to work out why the gsg (golden
> surfer binary) format wasn't working on win32.  It turns out it used
> dynamic_cast and our default build options didn't include /GR so dynamic
> casts just didn't work.  Grr.
> 
> I have added /GR for Visual Studio .NET 2003 and earlier.  I'm not clear
> whether it applies in VS.NET 2005 and later or not.
> 
> I also changed the default builds option an optimized non-debug build.  The
> debug builds are too quirky (special runtime requirements) and so I don't
> feel they are suitable as a default.
> 
> But what I would really like to do is remove /MDd in favor of /MD for debug
> builds.  /MDd means we are building against the debug CRT - something I 
> have
> very rarely felt any need for.  I believe it is contrary to MS's EULA to
> redistribute the debug CRT so the binaries are not very useful for reuse.
> And it is hell mixing /MDd and /MD stuff.  Can someone remind me how /MDd
> got added in nmake.opt?  I don't recall a discussion of the issue.
> 
> PS. /D_DEBUG apparently triggers a dependency on the debug CRT too, but
> only in ATL code (for us this is only the stuff in the vb6 directory.  Boy,
> did I swear a blue streak trying to work that out!
> 
> PPS. I'm not really so thrilled with all !IFDEF's in nmake.opt.  It is
> interfering with the "essential simplicity" of it in my opinion.
> 
> Best regards,



More information about the gdal-dev mailing list