I have built GDAL, and was experimenting on a project. I have external zlib 1.2.5
The external libraries are generally statically linked. When trying the same thing with gdal, I got a link error: error LNK2005: _deflate_copyright already defined in gdal.lib(deflate.obj) I tried to find where gdal is using zlib, to try to add the external reference, in similar fashion to other 3rd party software. There is no place to include zlib though, in frmts\makefile.vc there is something that I don't understand: EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_zlib And in port\makefile.vc there is an inclusion of the local zlib: EXTRAFLAGS = -I..\frmts\zlib -DHAVE_LIBZ I tried to emulate other libs, by adding in nmake.opt: # External ZLIB ZLIB_INCLUDE = $(SDK)/zlib-1.2.5/build/include And replacing in port\makefile.vc the line above with !IFDEF ZLIB_INCLUDE EXTRAFLAGS = $(ZLIB_INCLUDE) -DHAVE_LIBZ !ELSE EXTRAFLAGS = -I..\frmts\zlib -DHAVE_LIBZ !ENDIF But it didn't build. How can I build with external zlib, to avoid version conflicts ? Thank you.
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
