[GRASSLIST:356] Re: grass libraries

marcos boullón magán marcosboullon at gmail.com
Fri Mar 24 08:09:22 EST 2006


>  gcc -o prot1 utils.o db_mg.o session.o main.o -lreadline -lcurses
> -lgrass_gis
>  /usr/bin/ld: cannot find -lgrass_gis
>  collect2: ld returned 1 exit status
>  make: *** [prot1] Error 1

Yoy forgot again the -L/usr/local/grass6/lib switch in the linking
command (you have all the GRASS libs there, haven't you?).

Anyway, the easiest way to start programming against theses libraries
is reusing the code in grass6/vector/v.sample directory, in GRASS
sourcecode. Rename your code as "main.c" and run "make" to compile.
Unfortunately the Makefile file assumes that you managed to compile
and build GRASS, not a trivial task (nor too dificult).

Good luck,

M.

--
-- marcos boullón magán




More information about the grass-user mailing list