<DIV>Dear vtk users,</DIV>
<DIV> </DIV>
<DIV> I'm new in using vtk. When I tried to use vtkPolyDataReader to input .vtk format data in an exercise, I run into trouble and got following compiling problem: </DIV>
<DIV> </DIV>
<DIV>--------------------Configuration: StrSph2 - Win32 Debug--------------------<BR>Linking...<BR>StrSph2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class vtkPolyData * __thiscall vtkPolyDataReader::GetOutput(void)" (<A href="mailto:__imp_?GetOutput@vtkPolyDataReader@@QAEPAVvtkPolyData@@XZ">__imp_?GetOutput@vtkPolyDataReader@@QAEPAVvtkPolyData@@XZ</A>)<BR>StrSph2.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class vtkPolyDataReader * __cdecl vtkPolyDataReader::New(void)" (<A href="mailto:__imp_?New@vtkPolyDataReader@@SAPAV1@XZ">__imp_?New@vtkPolyDataReader@@SAPAV1@XZ</A>)<BR>Debug/StrSph2.exe : fatal error LNK1120: 2 unresolved externals<BR>Error executing link.exe.</DIV>
<DIV>ALL_BUILD - 3 error(s), 0 warning(s)<BR></DIV>
<DIV> </DIV>
<DIV>My code is following. Any help is highly appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV> </DIV>
<DIV>Dan</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>#include "vtkRenderer.h"<BR>#include "vtkRenderWindow.h"<BR>#include "vtkRenderWindowInteractor.h"<BR>#include "vtkSphereSource.h"<BR>#include "vtkPolyDataReader.h"<BR>#include "vtkElevationFilter.h"<BR>#include "vtkLookupTable.h"<BR>#include "vtkDataSetMapper.h"<BR>#include "vtkActor.h"</DIV>
<DIV>void main ()<BR>{<BR> vtkRenderer *renderer = vtkRenderer::New();<BR> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer(renderer);<BR> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renWin);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> vtkPolyDataReader *polydata = vtkPolyDataReader::New();<BR> polydata->SetFileName("honolulu.vtk");<BR> <BR> vtkElevationFilter *colorIt = vtkElevationFilter::New();<BR> colorIt->SetInput((vtkDataSet *)polydata->GetOutput());<BR> colorIt->SetLowPoint(0,0,-1);<BR> colorIt->SetHighPoint(0,0,1);</DIV>
<DIV> vtkLookupTable *lut = vtkLookupTable::New();<BR> lut->SetHueRange(0,0);<BR> lut->SetSaturationRange(0,0);<BR> lut->SetValueRange(.1,1);</DIV>
<DIV> vtkDataSetMapper *mapper = vtkDataSetMapper::New();<BR> mapper->SetLookupTable(lut);<BR> mapper->SetInput(colorIt->GetOutput());</DIV>
<DIV> vtkActor *actor = vtkActor::New();<BR> actor->SetMapper(mapper);</DIV>
<DIV> renderer->AddActor(actor);<BR> renderer->SetBackground(1,1,1);<BR> renWin->SetSize(450,450);</DIV>
<DIV> renWin->Render();</DIV>
<DIV> // interact with data<BR> iren->Start();</DIV>
<DIV> // Clean up<BR> renderer->Delete();<BR> renWin->Delete();<BR> iren->Delete();<BR> colorIt->Delete();<BR> lut->Delete();<BR> mapper->Delete();<BR> actor->Delete();<BR>}<BR></DIV>
<DIV> </DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>