[GRASS-dev] unknown reference to G__gisinit
Xavier Rubio
xrubio at gmail.com
Fri May 4 07:37:32 EDT 2012
Hi, I'm starting to develop some code using Grass following the
programmer's manual:
http://grass.osgeo.org/programming6/gislib.html
but I'm unable to link an example with just the library initialization,
receiving this error:
gcc -o main.o -c -I/usr/lib/grass64/include main.cxx
gcc -o test main.o -L/usr/lib/grass64/lib -lgrass_gis
main.o: In function `main':
main.cxx:(.text+0x3b): undefined reference to `G__gisinit(char const*, char
const*)'
while compiling this code:
#include <grass/gis.h>
int main (int argc, char **argv)
{
G_gisinit(argv[0]);
}
I'm linking against the correct library and path, because taking a look at
the symbols of libgrass_gis.so it seems to exist:
nm -D /usr/lib/grass64/lib/libgrass_gis.so | grep gisinit
000000000001fdae T G__check_gisinit
000000000001fc91 T G__gisinit
000000000001fd57 T G__no_gisinit
so I'm lost here...any ideas? I use Ubuntu oneiric (grass 6.4.1), but I
also linked against a manually compiled version of grass 6.4.2 with the
same results.
Thanks,
Xavi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20120504/c85b86d4/attachment.html
More information about the grass-dev
mailing list