[vtkusers] Linking errors

Amy Henderson amy.henderson at kitware.com
Tue Sep 14 16:16:58 EDT 2004


Did you link against the appropriate VTK libraries (vtkCommon and vtkIO)?

- Amy

At 04:09 PM 9/14/2004, p3rdigao wrote:
>Hello I compile this program...
>
>#include "vtkDataSetReader.h"
>
>#include "vtkDataSetWriter.h"
>
>#include "vtkDataSet.h"
>
>void main(void){
>
>       vtkDataSetReader *Reader = vtkDataSetReader::New();
>
>       Reader->SetFileName("c:\braquial.vtk");
>
>      vtkDataSet *dataSet = (vtkDataSet*)vtkDataSet::New();
>
>      dataSet = Reader->GetOutput();
>
>}
>
>but in the end the result are these 4  linkage errors:
>
>1) LNK2001: unresolved external symbol "public: class vtkDataSet * 
>__thiscall vtkDataSetReader::GetOutput(void)" 
>(?GetOutput at vtkDataSetReader@@$$FQAEPAVvtkDataSet@@XZ)
>
>2) LNK2001: unresolved external symbol "public: static class vtkDataObject 
>* __cdecl vtkDataObject::New(void)" (?New at vtkDataObject@@$$FSAPAV1 at XZ)
>
>3) LNK2001: unresolved external symbol "public: static class 
>vtkDataSetReader * __cdecl vtkDataSetReader::New(void)" (? 
><mailto:?New at vtkDataSetReader@@$$FSAPAV1 at XZ> 
>New at vtkDataSetReader@@$$FSAPAV1 at XZ)
>
>
>4) test fatal error LNK1120: 3 unresolved externals
>
>So what is the problem?
>
>thanks
>
>
>
>
>
>
>_______________________________________________
>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