[GRASS-dev] i.landsat.toar clang compilation fails due to inline

Markus Neteler neteler at osgeo.org
Sun Oct 20 05:46:02 PDT 2013


On Sun, Oct 20, 2013 at 5:46 AM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
> Hi,
>
> i.landsat.toar compilation fails when compiling using clang compiler. The
> error is:
>
>  undefined reference to `date_replace_slash'
>
> This function is defined using ``inline`` keyword:
>
>  inline void date_replace_slash(char *str)
>
> I know ``inline`` is not part of C89. However, I'm not sure about the fix. I
> can fix it by replacing ``inline`` by ``__inline__``. This works for GCC [1]
> and clang (should support GCC extensions) but I'm not sure about other
> compilers (on the less usual platforms).

"static" may be a viable solution. For comments on this, see also

http://lists.osgeo.org/pipermail/grass-dev/2013-July/065231.html

Markus


More information about the grass-dev mailing list