[vtkusers] Link errors on Win2000

Andrew J. P. Maclean a.maclean at cas.edu.au
Tue May 27 19:16:23 EDT 2003


You need to include the lib files - the linker needs to know what they
are.
Go to properties, find the linker property page and find the Input
Section. Put the names of the lib files in there e.g :
vtkCommon.lib vtkFiltering.lib vtkGraphics.lib vtkHybrid.lib
vtkImaging.lib vtkIO.lib vtkjpeg.lib vtkpng.lib vtkRendering.lib
vtkzlib.lib 
___________________________________________

Andrew J. P. Maclean

Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA

Ph: +61 2 9351 3283
Fax: +61 2 9351 7474

URL: http://www.cas.edu.au/
___________________________________________


-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com] On Behalf Of Mathieu
Malaterre
Sent: Tuesday, 27 May 2003 17:40
To: Jon Johansson
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] Link errors on Win2000

Jon,
	You have two options:

- Use CMake (go to http://cmake.org)
- Read the manual from Rasmus Paulsen (http://www.imm.dtu.dk/~rrp/) 
title: "Installing VTK 4.1.x on a Windows PC"

Good luck
mathieu
Ps: Eventhough it was written for VTK 4.1.x it is still accurate for VTK

4.2

Jon Johansson wrote:
> Hi,
> 
> I have the latest prebuilt release of VTK, VTK4.2 dated Apr. 8, 2003
> which I downloaded from http://www.vtk.org/get-software.php#release
> today.
> 
> I'm trying to compile the Cone.cxx example from 
>    C:\Program Files\vtk42\Examples\Tutorial\Step1\Cxx
> and it seems to compile just fine, but linking fails with
> the errors below.
> 
> I have include and library files in
> 
>    C:\Program Files\vtk42\include\vtk
>    C:\Program Files\vtk42\lib\vtk
> 
> and these are included in my Visual Studio 6 project settings in
> (I think) the correct spots. There doesn't seen to be any other
> libraries for me to point at in the VTK directory structure that 
> I have. 
> 
> If anyone sees my mistake could you let me know?
> 
> Thank you,
> Jon.
> 
> --------------------Configuration: Cone - Win32
Debug--------------------
> Compiling...
> Cone.cxx
> Linking...
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: void __thiscall vtkCamera::Azimuth(double)"
> (__imp_?Azimuth at vtkCamera@@QAEXN at Z)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: class vtkCamera * __thiscall
vtkRenderer::GetActiveCamera(void)"
> (__imp_?GetActiveCamera at vtkRenderer@@QAEPAVvtkCamera@@XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: static class vtkRenderWindow * __cdecl
vtkRenderWindow::New(void)"
> (__imp_?New at vtkRenderWindow@@SAPAV1 at XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: void __thiscall vtkRenderer::AddActor(class vtkProp *)"
> (__imp_?AddActor at vtkRenderer@@QAEXPAVvtkProp@@@Z)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: static class vtkRenderer * __cdecl vtkRenderer::New(void)"
> (__imp_?New at vtkRenderer@@SAPAV1 at XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: static class vtkActor * __cdecl vtkActor::New(void)"
> (__imp_?New at vtkActor@@SAPAV1 at XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: void __thiscall vtkPolyDataMapper::SetInput(class vtkPolyData
*)"
> (__imp_?SetInput at vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: class vtkPolyData * __thiscall
vtkPolyDataSource::GetOutput(void)"
> (__imp_?GetOutput at vtkPolyDataSource@@QAEPAVvtkPolyData@@XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: static class vtkPolyDataMapper * __cdecl
> vtkPolyDataMapper::New(void)"
(__imp_?New at vtkPolyDataMapper@@SAPAV1 at XZ)
> Cone.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport)
> public: static class vtkConeSource * __cdecl vtkConeSource::New(void)"
> (__imp_?New at vtkConeSource@@SAPAV1 at XZ)
> Debug/Cone.exe : fatal error LNK1120: 10 unresolved externals
> Error executing link.exe.
> 
> Cone.exe - 11 error(s), 0 warning(s)
> 
> 
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/





More information about the vtkusers mailing list