<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 the problem is, so I copy my code and</DIV>
<DIV> the cmake file here:<BR>vtkPolyDataReader *cone = vtkPolyDataReader::New();<BR> cone -> SetFileName("mySampleFile.vtk");<BR> cone -> Update();<BR>vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New);<BR> coneMapper->SetInput( cone->GetOutput() );<BR>vtkActor *coneActor = vtkActor::New();<BR> coneActor->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> INCLUDE(${USE_VTK_FILE})<BR>ENDIF (USE_VTK_FILE)<BR>ADD_EXECUTABLE(myTest2 myTest2.cpp)<BR>TARGET_LINK_LIBRARIES(myTest2 vtkRendering)</DIV>
<DIV> </DIV>
<DIV>Thanks very much for any help!!!</DIV>
<DIV> </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>