Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compliation Error when Qt use Mqueue
Qt 6.11 is out! See what's new in the release blog

Compliation Error when Qt use Mqueue

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 3.5k Views 2 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by houmingc
    #1

    Headers and cpp files that compiles successfully is extracted from codeSourcery and inserted into Qt creator IDE. I am using message queue (MQueue)

    Compiler error is as below:
    make: *** No rule to make target CMsgQ.cc', needed byCMsgQ.o'. Stop.

    CMsgQ.o: undefined reference to symbol 'mq_send@@GLIBC_2.3.4'
    error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show your project pro file ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        houmingc
        wrote on last edited by houmingc
        #3

        QT += core gui
        QT += widgets
        QT += network
        QT +=gui
        QT +=gui declarative
        QT += xml
        ---------------------------------------------------------.cc file -----------------
        #include <stdio.h>
        #include <stdlib.h>
        #include <strings.h>
        #include <errno.h>

        error:
        strerror was not declared in this scope
        memcpy was not declared in this scope

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          No SOURCE += CMsgQ.cc ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            houmingc
            wrote on last edited by houmingc
            #5

            HEADER and SOURCE file is correct, else it will not compile.
            I change CMsgQ.cc to CMsgQ.cpp
            did a qmake -config serialport.pro

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Are you linking to librt ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              H 1 Reply Last reply
              0
              • SGaistS SGaist

                Are you linking to librt ?

                H Offline
                H Offline
                houmingc
                wrote on last edited by
                #7

                can give an example, how to link and compile

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  win32:LIBS += -lrt

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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