[Insight-users] Whats wrong with my code

Luca Antiga luca.antiga at gmail.com
Thu Nov 22 11:49:42 EST 2007


Hi Nadia,
  the code is fine the way you first reported it.
You just have to add vtkHybrid to the TARGET_LINK_LIBRARIES in your  
CMakeLists.txt file.
Cheers

Luca



On Nov 22, 2007, at 5:45 PM, Nadia Alvi wrote:

> Hi Gabriele,
>
> Thanks for the reply. But apparently this does not solve the  
> problem. I have instantiated other vtk templates in the same way.  
> However, the description of the constructor says:
>
> static vtkVRMLImporter* vtkVRMLImporter::New (   )  [static]
> "Create an object with Debug turned off, modified time initialized  
> to zero, and reference counting on. "
>
> Does this give any clue?
>
> Many Many thanks,
> Nadia
>
>
>
> gabri <tartuz at gmail.com> wrote:
> Hi Nadia,
> I'm new as well but I think the problem is that for a template
> programming you have to use the PointerType of the template class to
> create a pointer in this way :
>
> vtkVRMLImporter::Pointer importer = vtkVRMLImporter::New();
>
> look if this fix your problem
>
> Best reguards,
> gabriele
>
>
> Nadia Alvi ha scritto:
> > Hi,
> >
> > I am having a problem in a very basic code of using vtkVRMLImporter
> > class. Could some one please have a look at this code:
> >
> > #include "vtkVRMLImporter.h"
> > int main()
> > {
> >
> > vtkVRMLImporter *importer = vtkVRMLImporter::New();
> >
> > return 0;
> > }
> >
> > When I build the project, it gives me the following linking errors :
> >
> > 1. readVRML error LNK2019: unresolved external symbol "public:  
> static
> > class vtkVRMLImporter * __cdecl vtkVRMLImporter::New(void)"
> > (?New at vtkVRMLImporter@@SAPAV1 at XZ
> > ) referenced in function _main
> >
> > 2. readVRML fatal error LNK1120: 1 unresolved externals
> >
> >
> >
> > I am writing code in C++ after a long time...could some one please
> > help me out?
> >
> > Many thanks and regards,
> > Nadia
> >
> >  
> ---------------------------------------------------------------------- 
> --
> > Get easy, one-click access to your favorites. Make Yahoo! your
> > homepage.
> >  
> ---------------------------------------------------------------------- 
> --
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
>
>
>
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail.  
> See how.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list