[vtkusers] vtkBMPReader linking problems (Windows, VC 2003)

Vladimir Lazunin lazunin.v.aa at m.titech.ac.jp
Tue Jun 26 02:57:49 EDT 2007


Trying to use vtkBMPReader, but the program fails to link, giving me the  
following:

error LNK2019: unresolved external symbol "__declspec(dllimport) public:  
class vtkImageData * __thiscall vtkImageAlgorithm::GetOutput(void)"  
(__imp_?GetOutput at vtkImageAlgorithm@@QAEPAVvtkImageData@@XZ) referenced in  
function "bool __cdecl ReadVolume(char const *,int,int,int,int,int,int)"  
(?ReadVolume@@YA_NPBDHHHHHH at Z)

error LNK2019: unresolved external symbol "__declspec(dllimport) public:  
static class vtkBMPReader * __cdecl vtkBMPReader::New(void)"  
(__imp_?New at vtkBMPReader@@SAPAV1 at XZ) referenced in function "bool __cdecl  
ReadVolume(char const *,int,int,int,int,int,int)"  
(?ReadVolume@@YA_NPBDHHHHHH at Z)


The code is:

vtkBMPReader *vbmp = vtkBMPReader::New();
vbmp->SetFilePrefix(prefix);
vbmp->Allow8BitBMPOn();
vbmp->SetDataExtent(ext1, ext2, ext3, ext4, ext5, ext6);
vbmp->Update();
g_volume->DeepCopy(vbmp->GetOutput());

I've tried dynamically and statically linked builds of VTK with no  
success. I have Python wrappers for the dynamic one, and Python equivalent  
of the code above works fine. I linked my C++ program with all *.lib files  
of VTK except *Python.lib, but still doesn't builds. Tried to find some  
images-related flag in CMake, but didn't find any. What am I missing?



More information about the vtkusers mailing list