<br>Hi, I&#39;m starting to develop some code using Grass following the programmer&#39;s manual:<br><a href="http://grass.osgeo.org/programming6/gislib.html">http://grass.osgeo.org/programming6/gislib.html</a><br><br>but I&#39;m unable to link an example with just the library initialization, receiving this error:<br>
<br>gcc -o main.o -c -I/usr/lib/grass64/include main.cxx<br>gcc -o test main.o -L/usr/lib/grass64/lib -lgrass_gis<br>main.o: In function `main&#39;:<br>main.cxx:(.text+0x3b): undefined reference to `G__gisinit(char const*, char const*)&#39;<br>
<br>while compiling this code:<br>#include &lt;grass/gis.h&gt;<br><br>int main (int argc, char **argv)<br>{<br>    G_gisinit(argv[0]);<br>}<br><br>I&#39;m linking against the correct library and path, because taking a look at the symbols of libgrass_gis.so it seems to exist:<br>
<br>nm -D /usr/lib/grass64/lib/libgrass_gis.so | grep gisinit<br>000000000001fdae T G__check_gisinit<br>000000000001fc91 T G__gisinit<br>000000000001fd57 T G__no_gisinit<br><br>so I&#39;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.<br>
<br>Thanks,<br><br>Xavi<br><br>