[gdal-dev] multiple processor compile option for build on Windows

Gregory, Matthew matt.gregory at oregonstate.edu
Fri Apr 7 14:41:17 PDT 2017


Hi all,

I do a funky build of GDAL where I'm still using the ArcInfo write driver (GIO) from way back.  As part of that build, I need to use a '#import' statement to get information for ESRI's type libraries.  I build on Windows using VC9, but I'm guessing any later version of VC may have similar issues.

At SVN revision 37673, the nnmake.opt was updated to allow GDAL to build with multiple processors (/MP flag).  Apparently this causes issues when one has #import statements in the code (error C2813).  I'm wondering if it's possible to change the nnmake.opt file to specify whether or not to use multiple processors in building, e.g:

!IFDEF BUILD_MULT_PROC
CXX_MULT_PROC_FLAG=/MP
!ELSE
CXX_MULT_PROC_FLAG=
!ENDIF

and then below,

OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) $(CXX_MULT_PROC_FLAG) /nologo /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG

Would this cause any issues?  Or, if there's a better way for me personally to handle it, I'm all ears.

thanks, matt


More information about the gdal-dev mailing list