[vtkusers] vtkTypeRevisionMacro & New( )
Michael Thomas
aussieind at rediffmail.com
Thu Oct 21 04:24:04 EDT 2004
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041021/512707a7/attachment.htm>
-------------- next part --------------
Hi Guys,
I am trying to use the latest vtkDICOMImageReader class but when I compile the app, I get linker errors related to vtkTypeRevisionMacro & New( )functions in the vtkDICOMImageReader.h file.
== CUT ==
class CTestDicomImage : public vtkImageReader2
{
public:
static CTLADicomImage *New();
vtkTypeRevisionMacro( CTLADicomImage, vtkImageReader2);
.....
.....
.....
}
== CUT ==
The linker errors I get are these...
TLADicomImage.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CTestDicomImage::CollectRevisions(class ostream &)" (?CollectRevisions at CTestDicomImage@@MAEXAAVostream@@@Z)
TLADicomImage.obj : error LNK2001: unresolved external symbol "public: static class CTestDicomImage * __cdecl CTestDicomImage::New(void)" (?New at CTestDicomImage@@SAPAV1 at XZ)
As you guys would have noticed, I am not using the vtkDICOMImageReader class as is... Using them as is gives me several linker errors. So I created a dummy C++ class on VC++ 6.0 & used the content of vtkDICOMImageReader & replaced all vtkDICOMImageReader occurances with my Test class name i.e. CTestDicomImage. I had to remove the references to the vtkstd in the vtkDICOMImageReaderVector class as its a recent implementation while I am still using VTK 4.0( I suppose I will replace them with some other MFC list or collections). Everything seems fine except for these 2 linker errors. Whats going wrong here???
Could someone give some helpful pointers. What is the revision macro used for??? Why is there no implementation of *New() in most .cxx files. Am I missing something???
Cheers,
Michael
More information about the vtkusers
mailing list