[vtkusers] adding a member method to a vtk class

Leila Baghdadi baghdadi at sickkids.ca
Wed Oct 13 12:48:14 EDT 2004


Hi Hamid

you should try modifying CMakeList.txt if you are adding new classes,

I think it is better to make your methods available in the class itself!

try looking at the directory
VTK/Examples/Build/vtkLocal

you can place your class in the above directory, there is a
CMakeLists.txt file in the above directory which is good enough to get
you started,


HTH

Leila

On Wed, 2004-10-13 at 12:27, listboss wrote:
> Hi
> 
> I have added a member function to vtkImageReader class. This new
> function needs methods which are available in myclass.cpp
> 
> To compile my modified vtkImageReader class, first I tried to add
> myclass.cpp to the CMakeList.txt file located in IO folder, but the
> linker complained about a missing instantiator !!! :(
> 
> I removed the file from CMakeList.txt and I opened VisualStudio .Net,
> right clicked on IO and selected "Add New Class" and then I added
> "myclass.cpp" to "IO".
> It compiles fine but my question is "Is it right way of doing this ?"
> 
> Am I gonna see problems because how I am doing this, or it's just fine ?
> How should I do this if I want to compile VTK under Linux ?
> 
> Thanks in advance
> Hamid
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list