[vtkusers] vtkButtonSource- smart pointer error

Kiran Gachchi Kiran.Gachchi at hcl.com
Thu Oct 18 01:25:21 EDT 2012


Hi All,

I am creating GUI with a button in VTK.
I tried with the following code.

vtkSmartPointer<vtkButtonSource>abc = vtkSmartPointer<vtkButtonSource>::New();
  abc->GetTextureStyle();
  abc->SetTextureDimensions(10, 10);


And I am getting the error:


error C2665: 'vtkSmartPointer<T>::vtkSmartPointer' : none of the 4 overloads could convert all the argument types
1>        with
1>        [
1>            T=vtkButtonSource
1>        ]
1>        d:\programfiles\vtk\include\vtk-5.2\vtksmartpointer.h(176): could be 'vtkSmartPointer<T>::vtkSmartPointer(T *,const vtkSmartPointerBase::NoReference &)'
1>        with
1>        [
1>            T=vtkButtonSource
1>        ]
1>        while trying to match the argument list '(vtkPolyDataAlgorithm *, vtkSmartPointerBase::NoReference)'
1>        d:\programfiles\vtk\include\vtk-5.2\vtksmartpointer.h(125) : while compiling class template member function 'vtkSmartPointer<T> vtkSmartPointer<T>::New(void)'
1>        with
1>        [
1>            T=vtkButtonSource
1>        ]
1>        d:\assinments\vtk_programs\buttons\buttons\buttons.cpp(58) : see reference to class template instantiation 'vtkSmartPointer<T>' being compiled
1>        with
1>        [
1>            T=vtkButtonSource
1>        ]


Please let me know where should I do correction in the above code.

Thanks in advance

Regards,
Kiran



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121018/a5e7ff92/attachment.htm>


More information about the vtkusers mailing list