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

吴磊磊 wu-leilei at hotmail.com
Mon Mar 30 10:50:21 EDT 2009

Hello David:

Yes, I missed the vtkRendering. Then I met the other problem, during the debuging, "This application has failed to start because vtkRendering.dll was not found. Re-installing the application may fix this problem". Actually the vtkRendering.dll is in the \bin\debug or \bin\debug. Do you have further ideas on this problem. Thx.


Date: Mon, 30 Mar 2009 09:53:14 -0400
From: daviddoria at gmail.com
CC: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkPolyDataMapper "error LNK2001: unresolved	external symbol".

Sounds like you aren't linking to the vtk libraries. I usually just link to a lot of them

vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO  vtkFiltering vtkCommon

just to be sure :)



2009/3/30 吴磊磊 <wu-leilei at hotmail.com>

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() );

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

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

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

使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载!


Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090330/236e2faa/attachment.htm>

More information about the vtkusers mailing list