[vtkusers] defining a global vtk object
    cel02000 
    cel02000 at yahoo.com
       
    Tue Jun  5 15:02:44 EDT 2012
    
    
  
Dear All,
How should I define a global vtkDoubleArray? In the header file, I declared:
vtkSmartPointer<vtkDoubleArray> X = vtkDoubleArray::New();
I have a function in mycode.cpp which configures X during run-time. However,
the linker does not like it and give me the following error:
1>main.obj : error LNK2005: "class vtkSmartPointer<class vtkDoubleArray> X"
(?X@@3V?$vtkSmartPointer at VvtkDoubleArray@@@@A) already defined in mycode.obj
Could someone help me?
Thanks,
--
View this message in context: http://vtk.1045678.n5.nabble.com/defining-a-global-vtk-object-tp5713602.html
Sent from the VTK - Users mailing list archive at Nabble.com.
    
    
More information about the vtkusers
mailing list