[GRASS5] Re: GRASS <-> GDAL circular references
blazek at itc.it
Tue May 25 03:16:34 EDT 2004
On Monday 24 May 2004 15:30, Paul Kelly wrote:
> But I have since found that they need to be there when compiling with
> shared libraries on Cygwin (as far as I can remember it was discussed on
> the list that there was no way to allow undefined symbols in Cygwin DLLs).
Should we add somehow --no-undefined to make sure that it compiles on Cygwin?
It is not standard linker flag I guess. It is probably sufficient if
developers set this flag?
> > Could it be gproj staticaly linked with libgdal.a?
> I think so yes---it wouldn't make the gproj library any bigger---it only
> seems to check for undefined symbols there at that stage. libgdal.a would
> only be linked into the binary of the module that actually used it. But it
> would be linked into every module and if e.g. libgdal.a was linked into
> every vector module it would make things rather big.
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).
But OSR* probably use share/gdal/ files, which should be installed
To compile with libgdal.a we probably need a full path to the library
produced by gdal-config (new option)?
> Maybe the functions in convert.c could go into a special GRASS/GDAL
> interface library, something like a new version of libgrass. I only
> noticed after I had done most of the work on GPJ_wkt_to_grass()
> etc. that Frank had written some slightly similar projection information
> conversion functions that are in libgrass but not in any version of GRASS
> itself, or GDAL. I suppose the projection information conversion functions
> are really only needed when importing or exporting data, so they should be
> grouped with the other functions that do that.
Do you think that at least one function which produce a projection info in
a format known by GDAL OSR functions (WKT?) could be independent of GDAL
and put e.g. in libgrass_gis.so?
More information about the grass-dev