[Gdal-dev] new build strategy for org/orgsf_frmts/

Norman Vine nhv at cape.com
Wed Jul 16 21:03:23 EDT 2003


Alessandro Amici writes:
> 
> my plan is to use partial linking (ld -r) for sub-directory dependencies.
 
> NOTE: that the current patch has been tested on linux, but it assumes that 'ld 
> -r' works on all supported plattorms!
 

On WIn32  < Cygwin, MingW32 >   it is a bit simpler  :-)
to get a single link library for my current GDAL config all I do is

$(GDAL_SLIB):  $(GDAL_LIB)
	$(CXX) -shared -o $(GDAL_SLIB) \
	-Wl,--out-implib=libgdal.$(GDAL_VER).dll.a \
	-Wl,--export-all-symbols \
            -Wl,--allow-multiple-definition \
	-Wl,--enable-auto-import \
	-Wl,--whole-archive $(GDAL_LIB) $(CPL_LIB) $(OGR_LIB) \
	-Wl,--no-whole-archive $(OGRFRMTS_LIB) \
            -Wl,--no-whole-archive $(PG_LIB) $(LIBS) $(HDF_LIBS)

Cheers

Norman



More information about the Gdal-dev mailing list