[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: 
 c)EXTERNAL_LIBS =	$(OGDILIB) $(XERCES_LIB) $(EXPAT_LIB) $(OCI_LIB)
$(PG_LIB) \
	$(ECW_LIB_LINK) $(HDF4_LIB_LINK) $(FME_LIB) $(MRSID_LIB_LINK) \
	$(FITS_LIB_LINK) $(JPEG_LIB) $(NETCDF_LIB_LINK) $(PROJ4_LIB) \
	$(GEOTIFF_LIB) $(TIFF_LIB) $(PROJ_LIBRARY) $(SQLITE_LIB) \
	$(MYSQL_LIB) $(GEOS_LIB) $(HDF5_LIB_LINK) $(SDE_LIB) $(ARCOBJECTS_LIB)
$(DWG_LIB) \
	$(IDB_LIB) $(CURL_LIB) $(DODS_LIB) $(KAKLIB) $(PCIDSK_LIB) \
	$(ODBCLIB) $(JASPER_LIB) $(PNG_LIB) $(ADD_LIBS) $(OPENJPEG_LIB) \
	$(MRSID_LIDAR_LIB) $(LIBKML_LIBS) $(SOSI_LIBS) $(POPPLER_LIBS) \
	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 \
	$(LZMA_LIBS) \
	$(LIBICONV_LIBRARY) $(WEBP_LIBS) $(FGDB_LIB_LINK) $(FREEXL_LIBS)
$(GTA_LIBS) \
	$(INGRES_LIB) $(LIBXML2_LIB) $(PCRE_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