So that when building gdal with an external jpeg library on windows frmts/jpeg/*_12.cpp files will be built with JPEG_DUAL_MODE_8_12 defined. I believe this is the same problem Jeff McKenna ran into in Error compiling trunk (nitf) - however, there may have been other problems at runtime as Even Rouault points out.
Without passing these flags, jpgdataset_12.o and vsidataio_12.o will be empty. e.g.:
On linux, the frmts/jpeg/GNUmakefile does not have conditionals around $(JPEG_EXTERNAL_LIB) and always defines -DJPEG_DUAL_MODE_8_12 when jpeg12 is enabled via $(JPEG12_ENABLED).
Steps to reproduce the problem.
Unpack gdal-2.3.0
Configure nmake.opt to use an external jpeg library, but internal jpeg12 library, e.g.
In master/gdal/frmts/jpeg/makefile.vc
Could this please be:
So that when building gdal with an external jpeg library on windows frmts/jpeg/*_12.cpp files will be built with JPEG_DUAL_MODE_8_12 defined. I believe this is the same problem Jeff McKenna ran into in Error compiling trunk (nitf) - however, there may have been other problems at runtime as Even Rouault points out.
Without passing these flags, jpgdataset_12.o and vsidataio_12.o will be empty. e.g.:
With the proposed change, we see:
On linux, the frmts/jpeg/GNUmakefile does not have conditionals around $(JPEG_EXTERNAL_LIB) and always defines -DJPEG_DUAL_MODE_8_12 when jpeg12 is enabled via $(JPEG12_ENABLED).
Steps to reproduce the problem.
Operating system
Any windows builds
GDAL version and provenance
2.1.2 and 2.3.0 definitely have this problem, and it is still this way in master.