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

Dave Partyka dave.partyka at kitware.com
Mon Mar 30 11:56:06 EDT 2009


When your program is executed it is trying to find the vtk dlls but cannot
find them. One thing you can do is add your vtk\bin\debug directory to your
PATH. You can also do this from within visual studio by going under
Properties to your project and then go to Debugging. On that tab there is
the Environment setting that you could set something like
PATH=PATH;c:\vtk\bin\debug for example.
Hope that helps.

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

>  Hello David:
>
> Yes, in the project properties, there is the additional library
> directories. Maybe there is some problems during the vtk installation, I am
> checking that. Thanks.
>
> Ciao,
> Leilei
>
> ------------------------------
> Date: Mon, 30 Mar 2009 10:53:21 -0400
>
> From: daviddoria at gmail.com
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkPolyDataMapper "error LNK2001: unresolved
> external symbol".
>
> I don't use windows, so I don't know about these dll's, but it sounds like
> you may not have the compiler set to check that directory for files to link
> to (the -L flag in gcc). I'd bet you have to add the c:\... \vtk\bin\ folder
> to a list somewhere in the visual studio project properties.
>
> Thanks,
>
> David
>
>
> 2009/3/30 吴磊磊 <wu-leilei at hotmail.com>
>
>  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.
>
> Best,
> Leilei
>
> ------------------------------
> 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 :)
>
> 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
>
>
>
> ------------------------------
> 把MSN装进手机,更多聊天乐趣等你挖掘! 立刻下载! <http://mobile.msn.com.cn/>
>
>
>
> ------------------------------
> 更多热辣资讯尽在新版MSN首页! 立刻访问! <http://cn.msn.com/>
>
> _______________________________________________
> 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/7b257ce7/attachment.htm>


More information about the vtkusers mailing list