[vtkusers] Marching cubes, VTK and Win32

Greg Slabaugh slabaugh at ece.gatech.edu
Mon Sep 24 21:16:18 EDT 2001


Hello,

I have one more question about VTK and Win32.  I am porting a VTK program
from Unix to Windows.  This program uses marching cubes to display an
isosurface of a volume.  I scaled the program down to the following:

#include <stdio.h>
#include <stdlib.h>
#include <vtk.h>
#include <vtkMarchingCubes.h>

void main() {
  static vtkMarchingCubes  *isosurface;
  isosurface=vtkMarchingCubes::New();
}

When I compile the program, I get the following error message:

commands.obj : error LNK2001: unresolved external symbol
              "__declspec(dllimport) public: static class
              vtkMarchingCubes * __cdecl vtkMarchingCubes::New(void)" 
              (__imp_?New at vtkMarchingCubes@@SAPAV1 at XZ)

I think my linker doesn't know about the method New() of the
vtkMarchingCubes class.  In my environment (MSVC 6.0), I have told my
compiler to link to the vtkdll.lib file that I downloaded from
kitware.com, by specifying this in Project->Settings->Link.  The
vtkdll.dll file was installed in my c:\winnt\system32 directory.  

Any ideas?

Thanks for any insight you may be able to provide.  The program
(almost) works!

Regards,

| Greg Slabaugh
| Graduate Student, Center for Signal and Image Processing at Georgia Tech
| Home page:  http://www.ece.gatech.edu/users/slabaugh




More information about the vtkusers mailing list