On Sat, Apr 16, 2011 at 6:10 AM, Xunlei Wu <[email protected]> wrote:
> Hi All,
>
> Could anyone please explain the difference between VTK_IO_EXPORT and
> VTK_EXPORT (beyond the below definition)? I am writing a file reader plugin
> and defined my class as VTK_EXPORT. However, many VTK/IO/ reader examples,
> e.g. vtkAVSucdReader, vtkImageReader are defined as VTK_IO_EXPORT. From the
> source code,
>
> #define VTK_EXPORT VTK_ABI_EXPORT
>
> #if defined(vtkIO_EXPORTS)
>   #define VTK_IO_EXPORT VTK_ABI_EXPORT
> #else
>   #define VTK_IO_EXPORT VTK_ABI_IMPORT
> #endif

There is only a different on the Windows platform, but if you notice
it only exports if vtkIO_EXPORTS is defined, otherwise it imports.
THis is necessary for DLLs on Windows, all though platforms that
support symbol visibility only have a concept of exporting. So a macro
is needed for each DLL in order to ensure the symbols are
imported/exported correctly for shared windows libraries.

Marcus
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to