Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qextserialport problem
QtWS25 Last Chance

Qextserialport problem

Scheduled Pinned Locked Moved 3rd Party Software
9 Posts 4 Posters 7.6k Views
  • 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.
  • G Offline
    G Offline
    Giomaca
    wrote on last edited by
    #1

    Hello everyboby,
    I developed an application in Qt using Qt Creator, which use the library "qextserialport".
    This application was developed in Windows XP and it works.

    Now I need to run this application on linux.
    After the Qt Creator installation under linux (Ubuntu 10.04 LTS) I copied my project in linux PC and I tryed to compile it, but It didn't work.
    When I tried to compile that appliation under linux I found this error:

    undefined reference to 'QextSerialPort::QextSerialPort(QString const&)'

    I think I have some problem to link the "qextserialport" library.

    In the follow you can find the sections of the .pro file relative to the "qextserialport" library
    N.B. files for the "qextserialport" library are into the ./COM directory

    @
    INCLUDEPATH += ./COM

    QMAKE_LIBDIR += ../COM

    LIBS += -lqextserialport

    unix:DEFINES = TTY_POSIX
    win32:DEFINES = TTY_WIN
    QWT_DLL
    QT_DLL
    @

    Could someone help me?
    Thanks in advance.

    Gio

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jacobodeharo
      wrote on last edited by
      #2

      Hi,

      Can you try this:

      If the qextserialport shared libraries (.so) are in ~/PATH/TO/DIRECTORY/COM

      Open a Terminal and write:

      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/PATH/TO/DIRECTORY/COM/

      You should write the absolute path, not relative.

      Then,.. maybe you could execute the application.

      (Sorry if my english is poor).

      ¡Good luck!
      Jacobo.

      • "Before I speak, I have something important to say" (Groucho Marx)
      1 Reply Last reply
      0
      • J Offline
        J Offline
        jacobodeharo
        wrote on last edited by
        #3

        If you need to confirm the path, you can show the content of LD_LIBRARY_PATH doing:

        echo $LD_LIBRARY_PATH

        [quote author="jacobodeharo" date="1326901533"]Hi,

        Can you try this:

        If the qextserialport shared libraries (.so) are in ~/PATH/TO/DIRECTORY/COM

        Open a Terminal and write:

        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/PATH/TO/DIRECTORY/COM/

        You should write the absolute path, not relative.

        Then,.. maybe you could execute the application.

        (Sorry if my english is poor).

        ¡Good luck!
        Jacobo.[/quote]

        • "Before I speak, I have something important to say" (Groucho Marx)
        1 Reply Last reply
        0
        • A Offline
          A Offline
          AcerExtensa
          wrote on last edited by
          #4

          LIBS += -L/path/where/libextserialport/is -lqextserialport

          God is Real unless explicitly declared as Integer.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AcerExtensa
            wrote on last edited by
            #5

            and don't forget, linux is case sensitive! libextserialport.so != libExtSerialPort.so

            God is Real unless explicitly declared as Integer.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Giomaca
              wrote on last edited by
              #6

              Thanks a lot for reply.

              My qextserialport directory has the path:
              /home/QtProjects/Testqserialport/COM

              and contains the following files:

              -libqextserialport.a

              -libqextserialport.dylib

              -posix_qextserialport.h

              -qextserialbase.h

              -qextserialport.dll

              -qextserialport.h

              -win_qextserialport.h

              so that:

              jacobodeharo: I'd like to do what you told me, but I don't have any file .so.

              AcerExtensa: I add the path in the way you told me, so that the .pro file became:

              @INCLUDEPATH += ./COM

              QMAKE_LIBDIR += ../COM

              LIBS += -L/home/QtProjects/Testqserialport/COM -lqextserialport

              unix:DEFINES = TTY_POSIX

              win32:DEFINES = TTY_WIN
              QWT_DLL
              QT_DLL@

              But nothing change.

              I have the same error:

              undefined reference to ‘QextSerialPort::QextSerialPort(QString const&)'

              any other help?

              Thanks!

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jacobodeharo
                wrote on last edited by
                #7

                I think that you need to compile the project qextSerialPort in ubuntu. If you do that, you will make the .so shared libraries. Have you got the sources?

                You can get the sources here:

                http://code.google.com/p/qextserialport/source/checkout

                Then open the .pro file in QtCreator and compile.

                Good luck!
                Jacobo.

                • "Before I speak, I have something important to say" (Groucho Marx)
                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  AcerExtensa
                  wrote on last edited by
                  #8

                  Did you qmaked(regenerated Makefile) Project after you have edited .pro file? Take a look in Makefile, -L path & -l name should be on the LIBS line... and try to compile project from console with make... take a look what the compiler says... and post the output here. maybe the library is just broken...

                  God is Real unless explicitly declared as Integer.

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

                    Guys,
                    read "this":http://developer.qt.nokia.com/forums/viewreply/67246/.

                    Perhaps you change your mind and take another library.

                    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