[vtkusers] vtkStandardNewMacro problems with MSVC9

Karthik Krishnan karthik.krishnan at kitware.com
Fri Oct 17 17:49:03 EDT 2008


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
>



-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 371 3971 x119
Fax: 518 371 3971



More information about the vtkusers mailing list