[vtkusers] vtkStandardNewMacro problems with MSVC9

Francois Bertel francois.bertel at kitware.com
Fri Oct 17 18:24:11 EDT 2008


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
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list