[vtkusers] about lnk2001 error

Zhang zhijun zjzhang at ee.cuhk.edu.hk
Wed Sep 18 04:43:34 EDT 2002


Dear all: 

      I want to compile an program under visual c++ 6 under window xp, I use the vtk4.0 libs compiled manually. 
When I run a program made myself, there is the following lnk2001 errors invoked, I feel very strange why there could be 
these kind of lnk2001 err since both of the two functions have been declared and defined in the two classes and the 
parameters and the return value of the functions are both the same. 
Here are the two functions: 
  vtkTypeMacro(vtkGridTransform,vtkWarpTransform);
defined for IsTypeOf function and 
inline void vtkMarchingSquares::SetValue(int i, float value)
{this->ContourValues->SetValue(i,value);}
for SetValue function, Why there will be the unsolved external symbol function error info?


Here is the error information:
 Linking...
   Creating library Debug/test.lib and object Debug/test.exp
test.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkMarchingSquares::SetValue(int,float)" (__imp_?SetValue at vtkMarchingSquares@@QAEXHM at Z)
test.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl vtkGridTransform::IsTypeOf(char const *)" (__imp_?IsTypeOf at vtkGridTransform@@SAHPBD at Z)
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020918/5468dc9d/attachment.htm>


More information about the vtkusers mailing list