[vtkusers] C++ link error about vtkMarchingCubes

dahuang dahuang at skltr2.mech.pku.edu.cn
Sun Sep 29 09:48:37 EDT 2002


vtkusers:

    I met with a problem relating to vtkMarchingCubes recently. And this problem has been reported by someone else(http://public.kitware.com/pipermail/vtkusers/2002-April.txt), but I haven't found an answer to it. Now I put it again, hoping the experts can give an explanation.
   
   The problem is:when compiling the file medical2.cxx(mentioned on Page 510 of the book "The Visualization Toolkit:An Object-Oriented Approach to 3D Graphics"), we need to use the header file vtkMarchingCubes.h, which is in the patented directory of VTK source. But after I have built the vtkPatented.lib using CMake and put it in the vtk40\lib\vtk directory, the compiler VC6.0 still reports the link error below(already set the Options->Directories and Project Settings->Link Page).
   
   Where does the problem lies?
   
--------------------Configuration: medical2 - Win32 Debug--------------------
Linking...
medical2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkMarchingCubes::SetValue(int,float)" (__imp_?SetValue at vtkMarchingCubes@@QAEXHM at Z)
medical2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class vtkMarchingCubes * __cdecl vtkMarchingCubes::New(void)" (__imp_?New at vtkMarchingCubes@@SAPAV1 at XZ)
Debug/medical2.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

medical2.exe - 3 error(s), 0 warning(s)
     
 				

        dahuang
        dahuang at skltr2.mech.pku.edu.cn
          2002-09-29





More information about the vtkusers mailing list