Results 1 to 5 of 5

Thread: Getting qextserial to work

  1. #1
    Join Date
    Jan 2010
    Posts
    39
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Getting qextserial to work

    Hi all,

    I am trying to get qextserial to work in qt creator.

    I dl the qextserial 1.1 -> extract -> qmake -> make it.

    in my project, under project.pro I added

    INCLUDEPATH += /home/......../qextserialport
    QMAKE_LIBDIR += /home/......./qextserialport/build
    LIBS += -lqextserialport
    unixEFINES = _TTY_POSIX_
    win32EFINES = _TTY_WIN_ \
    QWT_DLL \
    QT_DLL

    all paths are right. Compilation works but whent I tried to run it, I got

    "error while loading shared libraries: libqextserialport.so.1: cannot open shared object file: No such file or directory"

    where should I place the lib files?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Getting qextserial to work

    where should I place the lib files?
    either in a path known to LD_LIBRARY_PATH, or in the same folder as your executable.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2010
    Posts
    39
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Getting qextserial to work

    I tried by coping over the lib files to the executable folder and also /usr/lib. however when I run the executables, the program crashes. Under Debug screen I got tons of warnings.

    Starting /home/EVA/Desktop/Project/c-examples/mul_form/mul_form...

    warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected address
    .dynamic section for "/lib/libpthread.so.0" is not at the expected address

    warning: difference appears to be caused by prelink, adjusting expectations
    difference appears to be caused by prelink, adjusting expectations

    warning: .dynamic section for "/lib/libm.so.6" is not at the expected address

    warning: difference appears to be caused by prelink, adjusting expectations

    warning: .dynamic section for "/lib/librt.so.1" is not at the expected address

    warning: difference appears to be caused by prelink, adjusting expectations

    warning: .dynamic section for "/lib/libglib-2.0.so.0" is not at the expected address

    warning: difference appears to be caused by prelink, adjusting expectations

    ...

    Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/85/b6149a8377a357541e89471eb7ee92474cc8de.debug
    /home/EVA/Desktop/Project/c-examples/mul_form/mul_form exited with code 0

    there are tons of it. Any idea how to resolve this. thanks.

  4. #4
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Getting qextserial to work

    Once upon a time I had this problem. I know of three ways to fix it, two of which high_flyer mentioned above. They are:

    1. LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/qextserialport.so.1/ (somewhat frowned upon - see how-to referenced below)
    2. cp qextserialpport.so.1 /executable/directory/
    3. as root - add "/path/to/qextserialport.so.1/" to ld.so.conf and run ldconfig (man ldconfig & man ld.so)


    Here is a good read on shared libraries FYI.

  5. #5
    Join Date
    Jan 2010
    Posts
    39
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Getting qextserial to work

    yup I manage to get it to work. its actually my mistake. I forgot to alloc memory to the variable. thanks

Similar Threads

  1. QT QSS ui work
    By davejh in forum Jobs
    Replies: 2
    Last Post: 12th May 2010, 16:31
  2. Why does this not work?
    By lnxusr in forum Newbie
    Replies: 8
    Last Post: 18th December 2009, 18:53
  3. Replies: 2
    Last Post: 13th December 2009, 20:27
  4. Replies: 3
    Last Post: 15th January 2008, 12:11
  5. problem while compiling qextserial port
    By jjbabu in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2007, 13:01

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.