[vtkusers] Linker problems

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Jan 9 10:12:19 EST 2006


usually this kind of errors means you do not link properly.
check what you link to.
--dsz

Rhys Thomas wrote:
> 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
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Dominik Szczerba, Dr.
ETZ C110 CO-ME/BIWI CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list