<DIV> </DIV>
<DIV>
<DIV>Hi,</DIV>
<DIV>I'am appreciate that you can help me to solve my problems:</DIV>
<DIV>1,When I compiled the follow code,there were 2 errors and 1 warning like this:</DIV>
<DIV>Linking...<BR>LINK : warning LNK4001: no object files specified; libraries used<BR>LINK : error LNK2001: unresolved external symbol _mainCRTStartup<BR>Debug/image1.exe : fatal error LNK1120: 1 unresolved externals<BR>Error executing link.exe.</DIV>
<DIV>2,I had added the lib files to vc workplace:vtkzlib.lib,CommonCxxTests.lib,vtkCommon.lib,vtkDICOMParser.lib,and so on.</DIV>
<DIV>3,What's the problem did I have?</DIV>
<DIV>Here is my code:</DIV>
<DIV>#include "vtkBMPReader.h"<BR>#include "vtkContourFilter.h"<BR>#include "vtkPolyDataMapper.h"<BR>#include "vtkActor.h"<BR>#include "vtkProperty.h"<BR>#include "vtkRenderer.h"<BR>#include "vtkRenderWindow.h"<BR>#include "vtkRenderWindowInteractor.h"<BR>#include "vtkActor2D.h"<BR>void main()<BR>{<BR> //create an instance of the class vtkBMPReader<BR> vtkBMPReader *image = vtkBMPReader::New();<BR> image->SetFilePrefix("D://image//head"); <BR> image->SetFilePattern("%s%d.bmp"); <BR> image->SetFileNameSliceOffset(1);<BR> image->SetFileNameSliceSpacing(1);<BR> image->SetNumberOfScalarComponents(3);<BR> image->SetDataSpacing(0.4,0.4,10);<BR> image->SetDataOrigin(0,0,0);<BR> image->SetDataExtent(0,255,0,255,1,10); <BR> image->Update();</DIV>
<DIV><BR> vtkContourFilter *contour=vtkContourFilter::New();<BR> contour->SetInput((vtkDataSet *)image->GetOutput());<BR> contour->SetValue(0,800);</DIV>
<DIV> vtkPolyDataMapper *mapper=vtkPolyDataMapper::New();<BR> mapper->SetInput(contour->GetOutput()); </DIV>
<DIV> vtkActor *actor=vtkActor::New();<BR> actor->SetMapper(mapper);<BR> actor->GetProperty()->SetColor(0,0, .9412);</DIV>
<DIV><BR> <BR> vtkRenderer *render=vtkRenderer::New();<BR> render->AddActor(actor);</DIV>
<DIV> vtkRenderWindow *renwin=vtkRenderWindow::New();<BR> renwin->AddRenderer(render);</DIV>
<DIV> vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();<BR> iren->SetRenderWindow(renwin);<BR> renwin->Render();<BR> iren->Start();<BR> // CDialog::OnOK();<BR>}</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV><SPAN ></SPAN><br><!-- footer --><br><br><br><br><br><div style="border-bottom:1px solid #999"></div><br>
        <font color="black" style="font-size:14.8px">3G 时 代 来 临 了,坚 决 对 传 统 邮 箱 说 不 !</font>
        <br>
         <a href="http://www.126.com/" target="_blank" style="font-size:13px;line-height:160%;color:blue">新 一 代 极 速 3G 邮 箱 闪 亮 登 场 ,280 兆 网 盘 免 费 送 ! 点 击 此 处 注 册
</a>