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

David Doria daviddoria at gmail.com
Mon Mar 30 09:53:14 EDT 2009


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 :)

Thanks,

David


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() );
>   VesselVolume->SetValue(0,255);
>
> &n bsp; 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
>
> ------------------------------
> 使用新一代 Windows Live Messenger 轻松交流和共享! 立刻下载!<http://im.live.cn/messenger.aspx>
>
> _______________________________________________
> 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:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090330/f520a4ed/attachment.htm>


More information about the vtkusers mailing list