[vtkusers] vtkStandardNewMacro problems with MSVC9
Dominik Szczerba
dominik at itis.ethz.ch
Sat Oct 18 01:52:16 EDT 2008
Karthik, Francois, Mike,
Many thanks for putting me on the right track!
Dominik
On Saturday 18 October 2008 01:32:33 am Michael Jackson wrote:
> Take a look at the following wiki example:
>
> http://www.cmake.org/Wiki/BuildingWinDLL
>
> It should tell you everything you need to know.
>
> _________________________________________________________
> Mike Jackson mike.jackson at bluequartz.net
> BlueQuartz Software www.bluequartz.net
> Principal Software Engineer Dayton, Ohio
>
> On Oct 17, 2008, at 6:30 PM, Dominik Szczerba wrote:
> > I am building it externally, without recompiling VTK (5.2.0).
> >
> > DSZ
> >
> > On Saturday 18 October 2008 12:24:11 am Francois Bertel wrote:
> >> Where are you putting this class? in VTK/Graphics or in some external
> >> project?
> >>
> >> On Fri, Oct 17, 2008 at 6:16 PM, Dominik Szczerba <dominik at itis.ethz.ch
> >
> > wrote:
> >>> Yea I had a detailed look at vtkWin32Header.h and it should do as
> >>> you say
> >>> - and as I do.
> >>> Looks to me like this is somehow broken with MSVS 9 2008 on derived
> >>> classes - was it tested with the new version?
> >>>
> >>> with regards,
> >>> Dominik
> >>>
> >>> On Saturday 18 October 2008 12:09:47 am Dominik Szczerba wrote:
> >>>> I am using:
> >>>>
> >>>> class VTK_GRAPHICS_EXPORT vtkThreshold2 : public
> >>>> vtkUnstructuredGridAlgorithm ...
> >>>>
> >>>> and I thought VTK_GRAPHICS_EXPORT does what you say, or do I miss
> >>>> anything?
> >>>>
> >>>> Dominik
> >>>>
> >>>> On Friday 17 October 2008 11:49:03 pm Karthik Krishnan wrote:
> >>>>> My guess is that you might be trying to use the classes on
> >>>>> windows without exporting them... the __declspec(dllimport) /
> >>>>> export thingie.
> >>>>>
> >>>>> You must explicitly export the classes and the global functions
> >>>>> to be made publicly accessible.
> >>>>>
> >>>>> See how VTK_FILTERING_EXPORT is used for instance... On unix,
> >>>>> this expands to nothing.
> >>>>>
> >>>>> On Fri, Oct 17, 2008 at 5:41 PM, Dominik Szczerba
> >>>>> <dominik at itis.ethz.ch>
> >>>>
> >>>> wrote:
> >>>>>> Compiling and linking to standard VTK classes work fine.
> >>>>>>
> >>>>>> As soon as I start using my own algorithms (e.g. derived from
> >>>>>> vtkUnstructuredGridAlgorithm) I get linking problems about
> >>>>>> unresolved New(), which I trace down to vtkStandardNewMacro. I
> >>>>>> see
> >>>>>> this macro goes very deep and suggests that so created objects
> >>>>>> must
> >>>>>> be somehow registered, but on linux the same code works just
> >>>>>> fine.
> >>>>>> What am I doing wrong?
> >>>>>>
> >>>>>> with regards,
> >>>>>> Dominik
> >>>>>> --
> >>>>>> Dominik Szczerba, Ph.D.
> >>>>>> Computational Physics Group
> >>>>>> Foundation for Research on Information Technologies in Society
> >>>>>> http://www.itis.ethz.ch
> >>>>>> _______________________________________________
> >>>>>> This is the private VTK discussion list.
> >>>>>> Please keep messages on-topic. Check the FAQ at:
> >>>>>> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
> >>>>>> subscribe/unsubscribe:
> >>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
> >>>
> >>> --
> >>> Dominik Szczerba, Ph.D.
> >>> Computational Physics Group
> >>> Foundation for Research on Information Technologies in Society
> >>> http://www.itis.ethz.ch
> >>> _______________________________________________
> >>> This is the private VTK discussion list.
> >>> Please keep messages on-topic. Check the FAQ at:
> >>> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
> >>> subscribe/unsubscribe:
> >>> http://www.vtk.org/mailman/listinfo/vtkusers
> >
> > --
> > Dominik Szczerba, Ph.D.
> > Computational Physics Group
> > Foundation for Research on Information Technologies in Society
> > http://www.itis.ethz.ch
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ Follow this link to
> > subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
--
Dominik Szczerba, Ph.D.
Computational Physics Group
Foundation for Research on Information Technologies in Society
http://www.itis.ethz.ch
More information about the vtkusers
mailing list