[vtk-developers] Patches: Large volumes, Image actor extent, Build tweak

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Jun 3 10:36:55 EDT 2011


On Fri, Jun 3, 2011 at 9:49 AM, Sean McBride <sean at rogue-research.com> wrote:
> On Fri, 3 Jun 2011 02:01:55 +0200, Frank Richter said:
>
>>Patch 0005: Hiding VTK symbols in static builds as well means they won't
>>be exposed when linking a static VTK into some other shared library.
>
> Regarding this one, there is a related bug:
>
> <http://public.kitware.com/Bug/view.php?id=9552>
>
> which I thought I'd bring to your attention.

Did you test the results of applying this patch? I was working on
this, and to support the static case requires more logic. On Windows,
we must prevent the declspec being used for static builds, but on GCC
4+ we must use the visibility attribute. Currently vtkWin32Header.h
(misleading name - relevant for all platforms) only uses the VTK_ABI_*
macros for shared builds, and so nothing would ever be marked as
visible with a static build.

vtkABI.h defines the core logic, and this could be extended out to
support this. Both files would need some attention, along with testing
on all platforms. If you are linking a static library into a shared
library, on an x86_64 platform at least, you will also need to build
with -fPIC otherwise it will fail to link.

It would be great to know what use cases you are thinking of when
applying this. I haven't had time to revisit this issue recently, but
there are several conditions we need to account for before something
like this could be applied.

Marcus
--
Marcus D. Hanwell, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4937



More information about the vtk-developers mailing list