[vtkusers] Linker problems

Rhys Thomas rgt at informatics.bangor.ac.uk
Mon Jan 9 10:04:13 EST 2006


Hello one and all, I would very much appreciate it if somebody could 
help me with the following problem. When I attempt to build the 
following program in Microsoft Visual Studio 6 I get back error messages 
from the linker complaining of an unresolved external symbol, however I 
believe that I have set the linker to link to all of the necessary code.

My code is thus:

#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkStructuredPoints.h"
#include "vtkStructuredPointsReader.h"

int main(int argc, char**argv)
{
    vtkStructuredPointsReader *reader = vtkStructuredPointsReader::New();
    reader->SetFileName("c:/abdomen.vtk");
    reader->Delete();
    return 0;
}

and produces the following output when a build attempt is made:

--------------------Configuration: RenderData - Win32 
Debug--------------------
Linking...
RenderData.obj : error LNK2001: unresolved external symbol "public: 
static class vtkStructuredPointsReader * __cdecl 
vtkStructuredPointsReader::New(void)" 
(?New at vtkStructuredPointsReader@@SAPAV1 at XZ)
Debug/RenderData.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

RenderData.exe - 2 error(s), 0 warning(s)

Thanks for your time

Rhys Thomas



More information about the vtkusers mailing list