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

Vladimir Lazunin lazunin.v.aa at m.titech.ac.jp
Tue Jun 26 04:28:12 EDT 2007


OK, it seems like some rather weird bug with my project, not related to  
vtkBMPReader, since it gives the same errors for everything (e. g.  
vtkJPEGReader, vtkPolyData etc.) and I've fixed it somehow during my  
rummaging through the project settings. Case closed, no more problem.

> 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?
> _______________________________________________
> This is the private VTK discussion list.Please keep messages on-topic.  
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list