Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] SerialPort Trouble
Forum Updated to NodeBB v4.3 + New Features

[Solved] SerialPort Trouble

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    timroberts
    wrote on last edited by
    #1

    I'm using a TI Sitara EVM-SK and QT Creator 2.71 based on Qt 4.8.4 running on Ubuntu 12.04 32 bit.

    I'm trying to the serialport library to allow me to use a UART on my device.

    My project works if I remove any reference to the serialport libraries.

    I have added @CONFIG += serialport@ to my project file.

    I've tried following the Wiki, and I believe I have the SerialPort library installed.

    I have copied the "Include" directory into my working directory for my project. At least as far as the QT Creator IDE goes, it seems to recognize the SerialPort commands.

    I start running into trouble when I cross compile the program and try to debug it on my target device. I get the error: "error while loading shared libraries: libQtSerialPortE.so.1: cannot open shared object file: No such file or directory". My debugger immediately exits without running the program. Trying to combat this error, I have copied the file it was looking for to the same directory as the executable on the target device, but this has not made a difference.

    Trying a different approach, I tried to run the included example "Terminal", but this gives me trouble as well. When I try to debug the program, I get the error "During startup program exited with code 126".

    Any tips are appreciated.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      please provide your steps what do you do (how you build and install qtserialport).

      1 Reply Last reply
      0
      • T Offline
        T Offline
        timroberts
        wrote on last edited by
        #3

        In my home folder, I've created a directory called "serialport-build". In my home folder I've also got the "qt-qtserialport" directory containing all downloaded files.

        I cd into the serialport-build directory, run the command @qmake ../qt-qtserialport/qtserialport.pro@

        then run the command make
        then sudo make install. This seemed to go through without any errors.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by
          #4

          It is made on host or on target device? Do you have libQtSerialPortE.so.1 file?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            timroberts
            wrote on last edited by
            #5

            It is made on the host. I have a libQtSerialPortE.so.1 file on my host, and I have also copied it into the same directory as the executable on the target directory (windows-style) but that did not work either.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #6

              In Linux a "windows-style" does not works. You should to copy your libQtSerialPortE.so.1 to Qt directory (which contains the QtCore and so on *so) on your target board. Or you can start your application on target with specify the LD_LIBRARY_PATH env. So, this issue is Linux-specific, please read about shared libraries and so on in Linux.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                timroberts
                wrote on last edited by
                #7

                Thank you kuzulis. Copying the file to the same directory as the QtCore and other *.so files has fixed my issue.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved