[GRASS5] Angle of incidence in viewshed/line of sight

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Tue Mar 8 13:33:09 EST 2005


On Tue, 8 Mar 2005, Roger Bivand wrote:
> 
> Am I completely wrong that for a module linking against say -lgis, 
> you still need a copy of libgis.a somewhere on the -L? How is the 
> module to "know" that its function calls are resolved? libproj.* is 
> distributed as *.a, *.la, and *.so - but you are right that 
> beta2/lib only has libgrass_*.so files. 

If you mean how does the linker find the symbols it needs into the .so, don't
worry, they are there. Their absence will trigger an error while linking the
final executable. The way this final linking is done is what points to one of
.a, .la, .so. So no, you don't need the .a if you are compiling a module using
-shared in the linking phase (or the equivalent for non-GNU systems).

Most libraries are distributed as libs in all of .a .la and .so; .a (created
by ar+ranlib, probably) for static compiles, .la is a static library created
by libtool which will be used in conjunction with libtool for linking further
libs, .so for shared.

> Are we anticipating that a 
> user will compile an added module locally even though the GRASS 
> install was binary? Is the compile train for added modules supposed 
> to know what wizzardry GRASS does with the LD path?

In principle, no. It only needs to be able to compile, so the proper -L and -I
configuration, which could be provided by a grass-config script, a la tcl-config.

At run-time, any LD tricks enabled by the grass script will be there, so no
need to worry, as long as the module is used as a module within a grass
session (i.e. not in a normal shell session).




More information about the grass-dev mailing list