[GRASS5] Re: GRASS <-> GDAL circular references

Glynn Clements glynn.clements at virgin.net
Tue May 25 08:48:13 EDT 2004


Paul Kelly wrote:

> > I don't think to link modules with libgdal.a but to link libgrass_gproj.so
> > with libgdal.a, that means the OSR* functions will be present in
> > libgrass_gproj.so only, but not in modules. libgrass_gproj.so
> > staticaly linked with libgdal.a has only 250KB (dynamicaly linked
> > with libgdal.so it has 60KB).
> 
> Well if that worked it would be an interesting idea but not very elegant I 
> think to have a separate GDAL for GRASS statically linked in, but as I 
> think about it more it might reduce a lot of problems.

Linking libgrass_gproj.so against a static libgdal.a could potentially
make the resulting library dependent upon everything on which
libgdal.a depends. And that includes C++; you might even need to use
g++ to link libgrass_gproj.so.

You would also have to know what those dependencies were, and either
list them in $(SLIBDEPS) for libgrass_gproj.so, or include them in
$(LIBES) for each module which uses libgrass_gproj.so. IIRC,
gdal-config doesn't provide this information.

My guess is that using a static GDAL library will create more problems
than it solves.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list