[IGSTK-Developers] Problem with the testing program

Julien Jomier jjomier at cs.unc.edu
Thu Jan 26 12:09:47 EST 2006


Patrick,

Can you check your CMakeCache.txt in the Sandbox binary directory and 
see if the IGSTK_TEST_POLARIS_ATTACHED is defined?

If this is not the case you might have to remove the cache and rerun CMake.

Julien

Patrick Cheng wrote:
> 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
> _______________________________________________
> IGSTK-Developers mailing list
> IGSTK-Developers at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
> 




More information about the IGSTK-Developers mailing list