[IGSTK-Developers] Problem with the testing program
Patrick Cheng
cheng at isis.georgetown.edu
Thu Jan 26 12:02:28 EST 2006
Hi Andinet,
I am having linking problem with the IGSTKLatestTests project.
igstkLatestTests error LNK2019: unresolved external symbol "int __cdecl
igstkPolarisTrackerTest(int,char * * const)"
(?igstkPolarisTrackerTest@@YAHHQAPAD at Z) referenced in function "void
__cdecl RegisterTests(void)" (?RegisterTests@@YAXXZ)
The problem is: I built my IGSTK with IGSTK_TEST_POLARIS_ATTACHED
IGSTKSandbox use the configuration from the IGSTK.
So in IGSTKSandbox's igstkSystemInformation.h
IGSTK_TEST_POLARIS_ATTACHED is being defined:
===================================================
#define IGSTK_TEST_POLARIS_ATTACHED
#define IGSTK_TEST_POLARIS_PORT_NUMBER \
igstk::SerialCommunication::PortNumber2
===================================================
IGSTKLatestTests is using the this igstkSystemInformation.h file.
I think the problem is in IGSTKSandbox/Testing/CMakeList.txt
Line 184
===============================================================
IF(IGSTK_TEST_AURORA_ATTACHED OR IGSTK_TEST_POLARIS_ATTACHED)
ADD_TEST(igstkNDICommandInterpreterTest ${IGSTK_TESTS}
igstkNDICommandInterpreterTest)
ENDIF(IGSTK_TEST_AURORA_ATTACHED OR IGSTK_TEST_POLARIS_ATTACHED)
IF(IGSTK_TEST_POLARIS_ATTACHED)
ADD_TEST(igstkPolarisTrackerTest ${IGSTK_TESTS} igstkPolarisTrackerTest)
ENDIF(IGSTK_TEST_POLARIS_ATTACHED)
===============================================================
The CMake variable IGSTK_TEST_POLARIS_ATTACHED didn't get the value from
the IGSTK's CMakeCache.txt...
So the test is not being added and compiled.. meantime, it was being
registered in the igstkTests.cxx
Thus there is a link error...
Patrick
More information about the IGSTK-Developers
mailing list