[IGSTK-Users] PolarisTrackerExample Linking Error

Jiwon Jamie Ryu jjamieryu at melab.snu.ac.kr
Tue Aug 2 10:17:59 EDT 2011


Hi all.

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.
So I start up with writing CMakeLists.txt shown as below.
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.)
But when I compile the solution, I keep getting about 400 errors as:


1>IGSTKSandbox.lib(igstkTracker.obj) : error LNK2001: "__declspec(dllimport)
public: unsigned long __thiscall itk::Object::AddObserver(class
itk::EventObject const &,class itk::Command *)" (
__imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)
1>IGSTKSandbox.lib(igstkTrackerTool.obj) : error LNK2001:
"__declspec(dllimport) public: unsigned long __thiscall
itk::Object::AddObserver(class itk::EventObject const &,class itk::Command
*)" (__imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)
1>IGSTKSandbox.lib(igstkCoordinateSystemDelegator.obj) : error LNK2001:
"__declspec(dllimport) public: unsigned long __thiscall
itk::Object::AddObserver(class itk::EventObject const &,class itk::Command
*)" (__imp_?AddObserver at Object@itk@@QAEKABVEventObject at 2@PAVCommand at 2@@Z)

I'm thinking it relates to IGSTKSandbox Linking problem, but I don't know
what.
Please help me out.
Thanks.

Jamie.
========================================
INCLUDE (${IGSTK_USE_FILE} )
ELSE (IGSTK_USE_FILE)
MESSAGE( FATAL_ERROR "This application requires IGSTK. One of these
components is missing. Please verify configuration")
ENDIF (IGSTK_USE_FILE)


INCLUDE_DIRECTORIES(
  ${IGSTKSandbox_SOURCE_DIR}/IGSTK/Source
  ${IGSTKSandbox_SOURCE_DIR}/Source
  ${IGSTKSandbox_BINARY_DIR}
  ${IGSTKSandbox_BINARY_DIR}/SourceLatest
)

IF(WIN32)
  LINK_LIBRARIES(
  AdeptTcpServer
  IGSTKSandbox
  )
ENDIF(WIN32)
INCLUDE_DIRECTORIES(./)
INCLUDE_DIRECTORIES(./PolarisHandler)
#INCLUDE_DIRECTORIES(E:/TK/IGSTKBIN2)
INCLUDE_DIRECTORIES(E:/TK/Sandbox-4-4/Sandbox-4.4)
#
# This option enables the scene graph observer to collect relavant events to
constuct the scene graph tree
#
OPTION(IGSTK_USE_SceneGraphVisualization "Enable scene graph visualization
by allowing the observer to listen to
relevant events" ON)
IF(IGSTK_USE_SceneGraphVisualization)
  INCLUDE_DIRECTORIES(
${IGSTKSandbox_SOURCE_DIR}/Utilities/SceneGraphVisualization)
ENDIF(IGSTK_USE_SceneGraphVisualization)


SET(Adept_SRC
  RobotTestV1.rc
  AdeptServerTest.cpp
  RobotTestV1.cpp
  RobotTestV1Dlg.cpp
  stdafx.cpp
)
SET(Adept_HRD
  AdeptServerTest.h
  AdeptTcpServer.h
  resource.h
  RobotTestV1.h
  RobotTestV1Dlg.h
  stdafx.h
  targetver.h
)
SET(Polaris_SRC
  PolarisTracker.cxx
)
SET(PolarisHandler
  ./PolarisHandler/APIStructures.h
  ./PolarisHandler/Comm32.cpp
  ./PolarisHandler/Comm32.h
  ./PolarisHandler/CommandConstruction.cpp
  ./PolarisHandler/CommandHandling.cpp
  ./PolarisHandler/CommandHandling.h
  ./PolarisHandler/Conversions.cpp
  ./PolarisHandler/Conversions.h
  ./PolarisHandler/Conversions.cpp
  ./PolarisHandler/Conversions.h
  ./PolarisHandler/INIFileRW.cpp
  ./PolarisHandler/INIFileRW.h
  ./PolarisHandler/MELAB_PolarisHandler.cpp
  ./PolarisHandler/MELAB_PolarisHandler.h
  ./PolarisHandler/SystemCRC.cpp
)

ADD_EXECUTABLE(Polaris_Robot WIN32 ${Adept_SRC} ${Adept_HRD} ${Polaris_SRC}
${PolarisHandler})
TARGET_LINK_LIBRARIES(Polaris_Robot IGSTKSandbox)
==============================================
*-----------------------------------------------------------------*
* Jiwon Jamie Ryu**
*
**
**
* PhD Candidate*
 Dept. Bioengineering
 Seoul National University
 TEL:    +82 10 8868 3678
 Office: +82 2 2072 3128
*-------------------------------------------------------*-------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20110802/e7791336/attachment-0001.html>


More information about the IGSTK-Users mailing list