[Insight-users] Whats wrong with my code

Nadia Alvi nadiaalvi at yahoo.com
Thu Nov 22 11:45:02 EST 2007


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071122/b1f2f991/attachment-0001.htm


More information about the Insight-users mailing list