Results 1 to 2 of 2

Thread: Error while running qt application on board

  1. #1
    Join Date
    Mar 2010
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Error while running qt application on board

    Hi,

    I have developed a application in Qt which works fine on Linux & Windows PC. now, I cross compiled it for a board (EM2440).
    When I run it, it throws following error.
    ************************************************** ***
    error while loading shared libraries: libQtGui.so.4
    : cannot open shared object file: No such file or directory

    ************************************************** ***

    I have used "static" flag with "configure" command while cross compiling qt(v4.6.3) source. I do not know why it uses shared library. How to get rid of this?


    Thanks for help in advance.

  2. #2
    Join Date
    Jan 2010
    Posts
    18
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Error while running qt application on board

    I've noticed this as well. I believe to statically link the libs you need to run your app, that first you would need to compile the Libraries statically. This has worked for a plugin that I use with my embedded app. In my plugin .pro file (separate directory), I have the following:

    TEMPLATE = lib
    CONFIG += plugin \
    static
    HEADERS = xxxxdriverplugin.h \
    xxxxbrdhandler.h
    SOURCES = xxxxbrddriverplugin.cpp \
    xxxxkbrdhandler.cpp

    TARGET = xxxxkbrddriverplugin

    DESTDIR = kbddrivers

    and when I cross compile the plugin, I get a file with a ".a" extension created in the kbddrivers directory. Note the xxxx's are to protect the name of the actual project that I'm on.

    i then "cd" over to the main app directory and do a cross-compile which then pulls the ".a" file into the main app. Here are the important parts of the main app's .pro file:

    CONFIG += static
    LIBS += -L../xxxxkbrdplugin/kbddrivers \
    -lxxxxkbrddriverplugin

    I'm able to transfer the cross compiled app onto the target and run. NOW, as for the Qt libs, I still need them (the ".so" files ). What I'm getting at is (as implied above), you may need a ".a" versions of the Qt libs your trying to statically link to your app. Hope this helps.

    c_&_c

Similar Threads

  1. run qt-embedded demos error on arm board
    By ghye in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 2nd December 2009, 14:20
  2. Trouble running application on ARM board
    By evinay in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 7th October 2009, 13:22
  3. Replies: 2
    Last Post: 21st July 2009, 10:22
  4. QT3 application is not running on ARM Board
    By soumya in forum Qt for Embedded and Mobile
    Replies: 16
    Last Post: 20th July 2009, 10:13
  5. Deployment of Application to freescale board
    By AP.Sakkthivel in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 26th April 2006, 04:17

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.