[vtkusers] vtkPolyDataMapper "error LNK2001: unresolved external symbol".

吴磊磊 wu-leilei at hotmail.com
Mon Mar 30 09:51:16 EDT 2009


Hello All:

My name is Leilei Wu, and I got some problems when compiling the codes related with VTK in visual studio 2005, both in release and debug mode. (I used visual studio 2003 before, there was no this kind problem)

In the code PART1 (see below), the compiling is ok, but in the code PART2  there are problems of

error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall vtkPolyDataMapper::SetInput(class vtkPolyData *)" (__imp_?SetInput at vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class vtkPolyDataMapper * __cdecl vtkPolyDataMapper::New(void)" 
(__imp_?New at vtkPolyDataMapper@@SAPAV1 at XZ)

================================
code PART1:
  vtkContourFilter  *VesselVolume =  vtkContourFilter::New();
  VesselVolume->SetInput( connector->GetOutput() );
  VesselVolume->SetValue(0,255);

  vtkSmoothPolyDataFilter *SmoothPolyDataFilter = vtkSmoothPolyDataFilter::New();
  SmoothPolyDataFilter->SetInput( VesselVolume->GetOutput() );
  SmoothPolyDataFilter->SetNumberOfIterations( 175 );

  vtkPolyDataNormals *NormalsPolyData = vtkPolyDataNormals::New();
  NormalsPolyData->SetInput( SmoothPolyDataFilter->GetOutput() );
  NormalsPolyData->FlipNormalsOn();

code PART2:
  vtkPolyDataMapper  *PolyMapper = vtkPolyDataMapper::New();
  PolyMapper->SetInput( NormalsPolyData->GetOutput() );
  int colormode = PolyMapper->GetColorMode();
=================================
with the vtk header files of 

#include "vtkImageWriter.h"
#include "vtkImageData.h"
#include "vtkImageViewer.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkDataSetMapper.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkCamera.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkCommand.h"
#include "vtkInteractorStyleTrackballCamera.h"
#include "vtkProperty.h"
#include "vtkMarchingCubes.h"
#include "vtkContourFilter.h"
#include "vtkOutlineFilter.h"
#include "vtkPolyDataNormals.h"
#include "vtkSmoothPolyDataFilter.h"
#include "vtkOutlineSource.h"
=================================

Can someone give me some solutions (sorry if there are solutions already on the vtk users board)?  Thank you very much! Have a nice day!

Best wishes
Leilei

_________________________________________________________________
MSN安全保护中心,免费修复系统漏洞,保护MSN安全!
http://im.live.cn/safe/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090330/812629d1/attachment.htm>


More information about the vtkusers mailing list