<html><div style='background-color:'><DIV>Hi all,<BR>I wrote a very simple code to visualize a cube I defined<BR>by myself. the data file name is myFile.vtk.<BR>When I run the code for this, I encountered compiling <BR>problem. it always said: error LNK2001: <BR>unresolved external symbol "__declspec(dllimport) public: class vtkPolyData * .....<BR>I don't know where&nbsp;the problem is, so I copy my code and</DIV>
<DIV>&nbsp;the cmake file here:<BR>vtkPolyDataReader *cone = vtkPolyDataReader::New();<BR>&nbsp;cone -&gt; SetFileName("mySampleFile.vtk");<BR>&nbsp;cone -&gt; Update();<BR>vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New);<BR>&nbsp; coneMapper-&gt;SetInput( cone-&gt;GetOutput() );<BR>vtkActor *coneActor = vtkActor::New();<BR>&nbsp; coneActor-&gt;SetMapper( coneMapper );<BR>....</DIV>
<DIV>the CMake file CMakeLists.txt:<BR>PROJECT (myTest2)<BR>INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)<BR>IF (USE_VTK_FILE)<BR>&nbsp; INCLUDE(${USE_VTK_FILE})<BR>ENDIF (USE_VTK_FILE)<BR>ADD_EXECUTABLE(myTest2 myTest2.cpp)<BR>TARGET_LINK_LIBRARIES(myTest2 vtkRendering)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks very much for any help!!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Phoebe</DIV></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMTEN/2746">MSN 8.</a> Get 2 months FREE*.</html>