<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [vtk-developers] VTK CVS broken: vtkInformationExecutivePortVectorKey and vtkExecutive link error in Debug only</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I've tried the hack but other classes in Filtering that refer to the<BR>
methods (which, to them, appear to come from Common) are still causing<BR>
warnings. I'm going to try adding the VTK_*_EXPORT macro to each member<BR>
function and see how that works.<BR>
<BR>
    David<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Brad King [<A HREF="mailto:brad.king@kitware.com">mailto:brad.king@kitware.com</A>]<BR>
Sent: Sat 10/20/2007 7:26 AM<BR>
To: Thompson, David C<BR>
Cc: vtk-developers@vtk.org; Berk Geveci<BR>
Subject: Re: [vtk-developers] VTK CVS broken: vtkInformationExecutivePortVectorKey and vtkExecutive link error in Debug only<BR>
<BR>
Thompson, David C wrote:<BR>
> Brad et al.,<BR>
><BR>
>     I'm seeing some warnings on Windows about inconsistent<BR>
> DLL linkage. Right now vtkInformation looks like:<BR>
><BR>
> class VTK_COMMON_EXPORT vtkInformation : public vtkObject<BR>
> {<BR>
>   // ...<BR>
>   void MethodInCommon();<BR>
>   void MethodInFiltering();<BR>
> };<BR>
><BR>
> I'm not familiar with Windows import/export behavior. Should<BR>
> I change it to<BR>
><BR>
> class VTK_COMMON_EXPORT vtkInformation : public vtkObject<BR>
> {<BR>
>   // ...<BR>
>   void MethodInCommon();<BR>
>   VTK_FILTERING_EXPORT void MethodInFiltering();<BR>
> };<BR>
><BR>
> or<BR>
><BR>
> class vtkInformation : public vtkObject<BR>
> {<BR>
>   // ...<BR>
>   VTK_COMMON_EXPORT    void MethodInCommon();<BR>
>   VTK_FILTERING_EXPORT void MethodInFiltering();<BR>
> };<BR>
><BR>
> or something else entirely?<BR>
<BR>
In general the latter would be necessary.  However we should be able to<BR>
hack around this for our case as follows.  Inside<BR>
Filtering/vtkInformation.cxx, write this:<BR>
<BR>
#include "vtkObject.h"<BR>
... other includes here...but not vtkInformation.h<BR>
#ifdef __vtkInformation_h<BR>
# error "vtkInformation.h must not be included before this line."<BR>
#endif<BR>
#undef VTK_COMMON_EXPORT<BR>
#define VTK_COMMON_EXPORT VTK_FILTERING_EXPORT<BR>
#include "vtkInformation.h" // must be last #include<BR>
...rest of code...<BR>
<BR>
This will hack the vtkInformation class to think it is exported from<BR>
Filtering when compiled inside that one source file.  That will cause<BR>
just those methods to be exported correctly.<BR>
<BR>
-Brad<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>