[GRASS-dev] unknown reference to G__gisinit

Xavier Rubio xrubio at gmail.com
Mon May 7 05:01:35 EDT 2012


Perfect, I will expand the wiki page while I develop my code if I find
issues and potential problems.

Xavi

2012/5/5 Markus Neteler <neteler at osgeo.org>

> On Sat, May 5, 2012 at 1:19 PM, Xavier Rubio <xrubio at gmail.com> wrote:
> > Hi, thanks for your answers. Markus, I compared the compilation of
> > "r.example" with my own system and realized that the only difference was
> the
> > compiler (gcc or g++). Compiling my code with gcc worked, so the problem
> is
> > the fact that I was developing C++ code to call a C function (the binary
> > symbols are different, so it explains the errors).
> > Fix this problem was rather easy; I specified the compiler that the gis.h
> > include is C code:
> >
> > extern "C"
> > {
> > #include <grass/gis.h>
> > }
> >
> > and it worked, just in case other people finds the same problem.
>
> Glad you found it. I have added a note to
> http://grass.osgeo.org/wiki/GRASS_and_C++
>
> (please expand that Wiki page)
>
> Markus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20120507/8eb73085/attachment.html


More information about the grass-dev mailing list