[GRASS5] Angle of incidence in viewshed/line of sight
Paul Kelly
paul-grass at stjohnspoint.co.uk
Tue Mar 8 11:15:05 EST 2005
Hello Roger
On Tue, 8 Mar 2005, Roger Bivand wrote:
> On Tue, 8 Mar 2005, Paul Kelly wrote:
>
>> Did we not already decide that now that GRASS has shared libraries, it
>> only needs the header files to be included in the binary distribution?
>> Then only the new module needs to be compiled (and a script can be
>> written to do this automatically).
>> Radim may even have already done this (added the headers to the install).
>
> Am I completely wrong that for a module linking against say -lgis, you
> still need a copy of libgis.a somewhere on the -L?
Not if there is a shared library there--it can link against it instead.
> How is the module to
> "know" that its function calls are resolved?
You would just link against the grass libraries when compiling it.
Probably two steps: something like
cc -c -I/usr/local/grass60/include testmodule.c -o testmodule.o
cc -o testmodule testmodule.o -L/usr/local/grass60/lib -lgrass_gis
would do it for a module that only links against the GIS library I think?
> libproj.* is distributed as
> *.a, *.la, and *.so - but you are right that beta2/lib only has
> libgrass_*.so files. Are we anticipating that a user will compile an added
> module locally even though the GRASS install was binary?
Yes I think that is easily possible now and is the best way to distribute
add-on modules (with a script that will compile on the local system),
rather than distributing lots of large and possibly incompatible binaries.
> Is the compile
> train for added modules supposed to know what wizzardry GRASS does with
> the LD path?
LD_LIBRARY_PATH is only relevant for running GRASS modules, not for
compiling. As long as the new 'testmodule' is run from within a GRASS
session, LD_LIBRARY_PATH will already be set correctly and it will find
the shared libraries it was linked against.
Hope this makes sense---I don't think there is a whole lot to it any more.
Paul
More information about the grass-dev
mailing list