[vtk-developers] libtiff inline insanity

Robert Maynard robert.maynard at kitware.com
Mon Oct 7 10:42:07 EDT 2013


That is because Microsoft doesn't offer C99 support which added the inline
keyword to the C standard, only C89. If you want to use inline with the
Visual Studio C compiler you should use:

#define inline __inline






On Mon, Oct 7, 2013 at 10:32 AM, Sean McBride <sean at rogue-research.com>wrote:

> Casey,
>
> I thought removing it entirely was reasonable too, but Microsoft's
> compiler did not agree, as it apparently does not recognize the 'inline'
> keyword in C!
>
> So here's attempt #2:
> <http://review.source.kitware.com/#/c/12924/>
>
> Sean
>
>
> On Sun, 6 Oct 2013 19:15:10 -0400, Casey Goodlett said:
>
> >Hi Sean,
> >
> >Thank you very much for raising this issue.  I was having trouble
> >cross-compiling VTK for iOS in VES and commenting out those lines fixes
> the
> >build.
> >
> >It seems reasonable to remove that #define inline clause entirely.  Do you
> >have a patch prepared?  Otherwise I can submit one.
> >
> >Thank you
> >
> >
> >On Fri, Oct 4, 2013 at 10:50 AM, Sean McBride <sean at rogue-research.com
> >wrote:
> >
> >> Hi all,
> >>
> >> Anyone know/understand the history of this nugget:
> >>
> >> -----------------------
> >> /* Define to `__inline__' or `__inline' if that's what the C compiler
> >>    calls it, or to nothing if 'inline' is not supported under any name.
>  */
> >> #ifndef __cplusplus
> >> #define inline
> >> //#cmakedefine inline
> >> #endif
> >> -----------------------
> >>
> >> Here:
> >>
> >> <
> >> http://vtk.org/gitweb?p=VTK.git;a=blob;f=ThirdParty/tiff/vtktiff/
> >tif_config.h.in;h=55ff16a21756dd896891f7b08ec47af664d0cafa;hb=HEAD
> >> >
> >>
> >> The "#define inline" is causing linker errors for me.
> >>
> >> Are VTK's minimum C compiler requirements now such that we can just
> assume
> >> 'inline' works?  Surely?  :)
> >>
> >> Cheers,
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20131007/e93c8393/attachment.html>


More information about the vtk-developers mailing list