Hi Jiwon Jamie Ryu,<div><br></div><div>Try to include this in your CMakeLists.txt</div><div><br></div><div><div>FIND_PACKAGE (ITK)</div><div>IF (ITK_FOUND)</div><div> INCLUDE (${ITK_USE_FILE})</div><div>ELSE (ITK_FOUND)</div>
<div> MESSAGE (FATAL_ERROR "Need ITK.")</div><div>ENDIF (ITK_FOUND)</div><div><br></div><div><br></div>Patrick</div><div><br><div class="gmail_quote">On Tue, Aug 2, 2011 at 10:17 AM, Jiwon Jamie Ryu <span dir="ltr"><<a href="mailto:jjamieryu@melab.snu.ac.kr">jjamieryu@melab.snu.ac.kr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Hi all. </div>
<div> </div>
<div>I'm trying to set up a new solution regarding Polaris tracker, and I'm trying to use the functions that are in PolarisTracker.cxx in IGSTKSandbox example. </div>
<div>So I start up with writing CMakeLists.txt shown as below. </div>
<div>Then, I used Cmake to configure and generate a solution. (Code added is the ones that I have written for other program and I'm trying to combine everything that I've got.)</div>
<div>But when I compile the solution, I keep getting about 400 errors as:</div>
<div> </div>
<div>
<div> </div>
<div>1>IGSTKSandbox.lib(igstkTracker.obj) : error LNK2001: "__declspec(dllimport) public: unsigned long __thiscall itk::Object::AddObserver(class itk::EventObject const &,class itk::Command *)" (<a href="mailto:__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z" target="_blank">__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z</a>) </div>
<div>1>IGSTKSandbox.lib(igstkTrackerTool.obj) : error LNK2001: "__declspec(dllimport) public: unsigned long __thiscall itk::Object::AddObserver(class itk::EventObject const &,class itk::Command *)" (<a href="mailto:__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z" target="_blank">__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z</a>) </div>
<div>1>IGSTKSandbox.lib(igstkCoordinateSystemDelegator.obj) : error LNK2001: "__declspec(dllimport) public: unsigned long __thiscall itk::Object::AddObserver(class itk::EventObject const &,class itk::Command *)" (<a href="mailto:__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z" target="_blank">__imp_?AddObserver@Object@itk@@QAEKABVEventObject@2@PAVCommand@2@@Z</a>) </div>
<div> </div>
<div>I'm thinking it relates to IGSTKSandbox Linking problem, but I don't know what. </div>
<div>Please help me out. </div>
<div>Thanks. </div>
<div> </div>
<div>Jamie. </div>
<div>========================================</div></div>
<div>INCLUDE (${IGSTK_USE_FILE} )<br>ELSE (IGSTK_USE_FILE)<br>MESSAGE( FATAL_ERROR "This application requires IGSTK. One of these <br>components is missing. Please verify configuration")<br>ENDIF (IGSTK_USE_FILE)</div>
<div> </div>
<div><br>INCLUDE_DIRECTORIES(<br> ${IGSTKSandbox_SOURCE_DIR}/IGSTK/Source<br> ${IGSTKSandbox_SOURCE_DIR}/Source<br> ${IGSTKSandbox_BINARY_DIR}<br> ${IGSTKSandbox_BINARY_DIR}/SourceLatest<br>)</div>
<div><br>IF(WIN32)<br> LINK_LIBRARIES(<br> AdeptTcpServer<br> IGSTKSandbox <br> )<br>ENDIF(WIN32)</div>
<div>INCLUDE_DIRECTORIES(./)<br>INCLUDE_DIRECTORIES(./PolarisHandler)<br>#INCLUDE_DIRECTORIES(E:/TK/IGSTKBIN2)<br>INCLUDE_DIRECTORIES(E:/TK/Sandbox-4-4/Sandbox-4.4)<br>#<br># This option enables the scene graph observer to collect relavant events to constuct the scene graph tree<br>
#<br>OPTION(IGSTK_USE_SceneGraphVisualization "Enable scene graph visualization by allowing the observer to listen to </div>
<div>relevant events" ON)<br>IF(IGSTK_USE_SceneGraphVisualization)<br> INCLUDE_DIRECTORIES( ${IGSTKSandbox_SOURCE_DIR}/Utilities/SceneGraphVisualization)<br>ENDIF(IGSTK_USE_SceneGraphVisualization)</div>
<div> </div>
<div><br>SET(Adept_SRC<br> RobotTestV1.rc<br> AdeptServerTest.cpp<br> RobotTestV1.cpp<br> RobotTestV1Dlg.cpp<br> stdafx.cpp<br>)</div>
<div>SET(Adept_HRD<br> AdeptServerTest.h<br> AdeptTcpServer.h<br> resource.h <br> RobotTestV1.h<br> RobotTestV1Dlg.h<br> stdafx.h<br> targetver.h<br>)</div>
<div>SET(Polaris_SRC<br> PolarisTracker.cxx<br>)<br>SET(PolarisHandler<br> ./PolarisHandler/APIStructures.h<br> ./PolarisHandler/Comm32.cpp<br> ./PolarisHandler/Comm32.h<br> ./PolarisHandler/CommandConstruction.cpp<br>
./PolarisHandler/CommandHandling.cpp<br> ./PolarisHandler/CommandHandling.h<br> ./PolarisHandler/Conversions.cpp<br> ./PolarisHandler/Conversions.h<br> ./PolarisHandler/Conversions.cpp<br> ./PolarisHandler/Conversions.h<br>
./PolarisHandler/INIFileRW.cpp<br> ./PolarisHandler/INIFileRW.h<br> ./PolarisHandler/MELAB_PolarisHandler.cpp<br> ./PolarisHandler/MELAB_PolarisHandler.h<br> ./PolarisHandler/SystemCRC.cpp<br>)<br> <br>ADD_EXECUTABLE(Polaris_Robot WIN32 ${Adept_SRC} ${Adept_HRD} ${Polaris_SRC} ${PolarisHandler})<br>
TARGET_LINK_LIBRARIES(Polaris_Robot IGSTKSandbox)<br>==============================================<br clear="all"></div>
<div><strong>-----------------------------------------------------------------</strong></div>
<div><font face="courier new,monospace"><strong> Jiwon Jamie Ryu</strong></font><font face="courier new,monospace"><strong> <br></strong></font></div><em></em>
<div><em><font face="courier new,monospace"></font></em> </div>
<div style="text-align:left"><em><font face="courier new,monospace"> PhD Candidate</font></em></div>
<div><font face="courier new,monospace"> Dept. Bioengineering <br> Seoul National University <br></font></div>
<div><font face="courier new,monospace"> TEL: <a href="tel:%2B82%2010%208868%203678" value="+821088683678" target="_blank">+82 10 8868 3678</a><br> Office: <a href="tel:%2B82%202%202072%203128" value="+82220723128" target="_blank">+82 2 2072 3128</a></font></div>
<div><strong>-------------------------------------------------------</strong>-------------</div><br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users</a><br></blockquote></div><br></div>