Results 1 to 2 of 2

Thread: how to add static library into qmake

  1. #1
    Join Date
    Aug 2007
    Posts
    6
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default how to add static library into qmake

    hello ,
    I am trying to create a make file through qmake and this is my hello.pro file
    CONFIG += qt
    CONFIG += thread

    SOURCES +=cgclib.cpp
    SOURCES +=cticontroller.cpp
    SOURCES +=ctieventhandler.cpp
    SOURCES +=main.cpp
    SOURCES +=cgcqueue.cpp
    SOURCES +=ctilog.cpp
    SOURCES +=sctools.c

    HEADERS +=cgclib.h
    HEADERS +=cticontroller.h
    HEADERS +=ctieventhandler.h
    HEADERS +=ctilog.h
    HEADERS +=Defines.h
    HEADERS +=cgcqueue.h
    HEADERS +=sctools.h
    HEADERS +=CTISwitchLog.h
    HEADERS +=CTILineInfo.h
    HEADERS +=CTILog.h
    HEADERS +=CTIDefines.h

    TARGET = CTISWITCH

    now the problem is that i and calling some of the header file like dxxxlib.h,msilib.h
    which are in /usr/dialogic/inc and the /usr/dialogic/lib contions *.so file which are static file
    now when i am type make the folling undefined function come into the console

    cticontroller.o(.text+0x13e): In function `CTIController::GetTotalDXLineCount()':
    : undefined reference to `dx_open'
    cticontroller.o(.text+0x154): In function `CTIController::GetTotalDXLineCount()':

    : undefined reference to `dx_sethook'
    cticontroller.o(.text+0x3be): In function `CTIController::SetNumOfRings(int, int)':
    : undefined reference to `dx_setrings'
    cticontroller.o(.text+0x43f): In function `CTIController::IntializeDxLines(int, int)':
    : undefined reference to `dx_open'


    : undefined reference to `ATDX_TERMMSK'
    cticontroller.o(.text+0xcf2): In function `CTIController::ProcessDxEvent(int, oller::FreeChannelResource(int)':
    : undefined reference to `dx_setevtmsk'
    cticontroller.o(.text+0x1167): In function `CTIController::FreeChannelResource(int)':
    : undefined reference to `dx_sethook'
    cticontroller.o(.text+0x11d1): In function `CTIController::FreeChannelResource(int)':
    : undefined reference to `dx_setevtmsk'
    cticontroller.o(.text+0x1200): In function `CTIController::FreeChannelResource(int)':
    : undefined reference to `dx_sethook'


    : undefined reference to `ms_unlisten'
    cticontroller.o(.text+0x15a5): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `ms_listen'
    cticontroller.o(.text+0x15ce): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `dx_listen'
    cticontroller.o(.text+0x15e6): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `ag_unlisten'
    cticontroller.o(.text+0x160c): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `dx_bldtngen'
    cticontroller.o(.text+0x1624): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `dx_playtone'
    cticontroller.o(.text+0x1676): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `ag_unlisten'
    cticontroller.o(.text+0x16d4): In function `CTIController::feedTone(int, int, int)':
    : undefined reference to `ATDV_ERRMSGP'
    cticontroller.o(.text+0x1709): In function `CTIController::feedDialToneOnTrunk(int, int)':
    : undefined reference to `dx_setevtmsk'
    cticontroller.o(.text+0x172d): In function `CTIController::feedDialToneOnTrunk(int, int)':
    : undefined reference to `dx_clrtpt'
    cticontroller.o(.text+0x1767): In function `CTIController::feedDialToneOnTrunk(int, int)':
    : undefined reference to `ms_unlisten'
    cticontroller.o(.text+0x1793): In function `CTIController::feedDialToneOnTrunk(int, int)':
    : undefined reference to `ms_listen'
    cticontroller.o(.text+0x17bc): In function `CTIController::feedDialToneOnTrunk(int, int)':
    : undefined reference to `dx_listen'

    : undefined reference to `dx_playtoneEx'
    cticontroller.o(.text+0x1b0e): In function `CTIController::FeedOtherToneTrunk(int, int)':
    : undefined reference to `dx_clrtpt'
    cticontroller.o(.text+0x1b8b): In function `CTIController::FeedOtherToneTrunk(int, int)':
    : undefined reference to `dx_get_tngencad'
    cticontroller.o(.text+0x1ba0): In function `CTIController::FeedOtherToneTrunk(int, int)':
    : undefined reference to `dx_playtoneEx'
    cticontroller.o(.text+0x1bcd): In function `CTIController::FeedOtherToneTrunk(int, int)':
    cticontroller.o(.text+0x1d30): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `dx_enbtone'
    cticontroller.o(.text+0x1d4a): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `dx_setevtmsk'
    cticontroller.o(.text+0x1d67): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `dx_sethook'
    cticontroller.o(.text+0x1d9f): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `ms_unlisten'
    cticontroller.o(.text+0x1dfd): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `dx_setevtmsk'
    cticontroller.o(.text+0x1e2c): In function `CTIController::FreeLineResource(int)':
    : undefined reference to `dx_sethook'
    cticontroller.o(.text+0x1e76): In function `CTIController::feedRing(int, int)':
    : undefined reference to `ms_genring'
    cticontroller.o(.text+0x1edd): In function `CTIController::GetDigits(int, int, int)':
    : undefined reference to `dx_clrtpt'
    cticontroller.o(.text+0x1f45): In function `CTIController::GetDigits(int, int, int)':
    : undefined reference to `dx_getdig'
    cticontroller.o(.text+0x1fca): In function `CTIController::MakeConnectionMstoMs(int, int)':
    : undefined reference to `ms_listen'
    cticontroller.o(.text+0x1fef): In function `CTIController::MakeConnectionMstoMs(int, int)':
    : undefined reference to `ms_listen'
    cticontroller.o(.text+0x2069): In function `CTIController::MakeConnectionDxtoMs(int, int)':
    : undefined reference to `ms_listen'
    cticontroller.o(.text+0x208e): In function `CTIController::MakeConnectionDxtoMs(int, int)':
    : undefined reference to `ag_listen'
    cticontroller.o(.text+0x20dd): In function `CTIController::BreakConnectionMstoMs(int, int)':
    : undefined reference to `ms_unlisten'
    cticontroller.o(.text+0x2130): In function `CTIController::BreakConnectionDxtoMs(int, int)':
    : undefined reference to `ms_setevtmsk'
    cticontroller.o(.text+0x2371): In function `CTIController::set_hkstate(int, int)':
    : undefined reference to `ATDX_STATE'
    cticontroller.o(.text+0x2385): In function `CTIController::set_hkstate(int, int)':
    : undefined reference to `dx_stopch'
    cticontroller.o(.text+0x2391): In function `CTIController::set_hkstate(int, int)':
    : undefined reference to `ATDX_STATE'
    cticontroller.o(.text+0x23ad): In function `CTIController::set_hkstate(int, int)':
    : undefined reference to `dx_sethook'
    cticontroller.o(.text+0x2413): In function `CTIController::ShutDown()':
    : undefined reference to `ms_unlisten'
    cticontroller.o(.text+0x24a4): In function `CTIController::ShutDown()':
    : undefined reference to `ms_close'
    cticontroller.o(.text+0x24ce): In function `CTIController::ShutDown()':
    : undefined reference to `ms_close'
    cticontroller.o(.text+0x2620): In function `CTIController::PlayFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, int)':
    : undefined reference to `dx_clrtpt'
    cticontroller.o(.text+0x2674): In function `CTIController::PlayFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int, int)':
    : undefined reference to `dx_play'
    main.o(.text+0x1b7): In function `InitSystem()':
    : undefined reference to `sr_setparm'
    sctools.o(.text+0x46): In function `nr_scroute':
    : undefined reference to `ag_getxmitslot'
    sctools.o(.text+0x6d): In function `nr_scroute':
    : undefined reference to `ag_listen'
    sctools.o(.text+0x8b): In function `nr_scroute':
    : undefined reference to `ag_getxmitslot'
    sctools.o(.text+0xbb): In function `nr_scroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0xd4): In function `nr_scroute':
    : undefined reference to `dx_getxmitslot'
    sctools.o(.text+0xe7): In function `nr_scroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0xf8): In function `nr_scroute':
    : undefined reference to `dx_listen'
    sctools.o(.text+0x112): In function `nr_scroute':
    : undefined reference to `dx_getxmitslot'
    sctools.o(.text+0x123): In function `nr_scroute':
    : undefined reference to `dx_listen'
    sctools.o(.text+0x138): In function `nr_scroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x141): In function `nr_scroute':
    : undefined reference to `ATDV_ERRMSGP'
    sctools.o(.text+0x157): In function `nr_scroute':
    : undefined reference to `ag_listen'
    sctools.o(.text+0x164): In function `nr_scroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x16d): In function `nr_scroute':
    : undefined reference to `ATDV_ERRMSGP'
    sctools.o(.text+0x19e): In function `nr_scunroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x1c7): In function `nr_scunroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x1e5): In function `nr_scunroute':
    : undefined reference to `dx_unlisten'
    sctools.o(.text+0x1f4): In function `nr_scunroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x1fc): In function `nr_scunroute':
    : undefined reference to `ATDV_ERRMSGP'
    sctools.o(.text+0x209): In function `nr_scunroute':
    : undefined reference to `ag_unlisten'
    sctools.o(.text+0x217): In function `nr_scunroute':
    : undefined reference to `dx_unlisten'
    sctools.o(.text+0x228): In function `nr_scunroute':
    : undefined reference to `ATDV_NAMEP'
    sctools.o(.text+0x231): In function `nr_scunroute':
    : undefined reference to `ATDV_ERRMSGP'
    sctools.o(.text+0x23e): In function `nr_scunroute':
    : undefined reference to `ag_unlisten'
    collect2: ld returned 1 exit status
    make: *** [CTISWITCH] Error 1

  2. #2
    Join Date
    Oct 2007
    Location
    Munich, Bavaria
    Posts
    144
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to add static library into qmake

    You need to add the libs defining the missing symbols.
    Look at that:
    http://doc.trolltech.com/4.3/qmake-v...ence.html#libs

    Good luck

Similar Threads

  1. Wrap a static QT library inside an XPCOM component ?
    By Paul_Xul in forum Qt Programming
    Replies: 2
    Last Post: 3rd August 2010, 07:16
  2. Replies: 16
    Last Post: 23rd May 2008, 10:12
  3. Building qt program with static library
    By JonathanForQT4 in forum Newbie
    Replies: 2
    Last Post: 22nd June 2007, 23:15
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  5. Win32 qmake: building a static library
    By Amanda in forum Qt Programming
    Replies: 5
    Last Post: 8th November 2006, 19:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.