[IGSTK-Users] IGSTK and QT

steve.berger at istb.unibe.ch steve.berger at istb.unibe.ch
Wed Dec 4 05:22:03 EST 2013


Ok, I found the error.

Forgot to link the IGSTK library in the QT .pro file:
LIBS += -L/usr/lib/
LIBS += -lIGSTK

Steve

________________________________
De : Berger, Steve (ISTB)
Envoyé : mardi, 3. décembre 2013 12:37
À : igstk-users at public.kitware.com
Objet : IGSTK and QT

Dear all,

I recently build and installed VTK 5.10.1 and ITK 4.4.2 from source code under Ubuntu 13.10. Everything seems to be ok (at least I think so).
Then I build IGSTK 5.2 as it is explained in the manual book. Seems to be ok.
Finally, I write the following basic code in QtCreator:

main.cpp:
------------
#include "igstkRealTimeClock.h"
int main(int , char** )
{
   igstk::RealTimeClock::Initialize();
    return EXIT_SUCCESS;
}


myProject.pro:
-------------------
SOURCES += \
    ../main.cpp
INCLUDEPATH += /usr/include/IGSTK


Which gives me an error:
undefined reference to 'igstk::RealTimeClock::Initialize()'

When I search for the ''igstkRealTimeClock'' files on my computer with the 'locate' command, I get the following output:
/home/berger/SpineBot/kitware/igstk/IGSTK-5.2/Source/igstkRealTimeClock.cxx
/home/berger/SpineBot/kitware/igstk/IGSTK-5.2/Source/igstkRealTimeClock.h
/usr/include/IGSTK/igstkRealTimeClock.h


I do not understand what is wrong:
- are there problems with the building process of IGSTK?
- did I forget to add something in the myProject.pro file?


Sorry if this question is really basic for you, but I'm new in this field and already try to find the answer by myself, without success...
I hope someone can give me a hand.

Kind regards,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20131204/94ef27ee/attachment-0001.html>


More information about the IGSTK-Users mailing list