[gdal-dev] GDAL/OGR 1.10.0 Beta1 Compiling with OpenJpeg 2.0

allenck allenck at windstream.net
Fri Mar 1 15:56:34 PST 2013

I have had some problems compiling the 1.10 beta with OpenJpeg support on
windows 7 and Microsoft Visual C++ 2008. 
 After configuring GDAL's nmake.opt file to include  OpenJpeg. I was getting
errors that openjpeg-2.0\openjpeg.h could not be found. There is a
workaround since GDAL is looking in the wrong place for the file:
 a)in the OpenJpeg project, make a copy of directory 'openjp2' in folder
..\openjpeg\src\lib and rename it to openjpeg-2.0
 a)Copy the file ..\Downloads\openjpeg\build\src\lib\openjp2\opj_config.h
into the openjpeg-2.0 folder created above. 
 b)GDAL will now compile but you will get onresolved virtuals. In order to
fix this, the gdal nmake.opt file needs to be edited to hard code the
library path in the link command: 
$(PG_LIB) \
$(DWG_LIB) \
	C:\Users\Allen\Downloads\openjpeg\build\bin\Debug\openjp2.lib \
	C:\Users\Allen\Downloads\podofo-0.9.1\build\src\Debug\podofo.lib \
	"C:\Program Files (x86)\freetype\lib\freetype.lib" \
	gdi32.lib \

Also in makefile.vc, I had to change the compiler /MD flag to /MDd for the
debug compile. 

I hope this 

View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-GDAL-OGR-1-10-0-Beta1-tp5028821p5037910.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

More information about the gdal-dev mailing list