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. symbol lookup error, undefined symbol: _ZN9QMetaType22
Forum Update on Monday, May 27th 2025

symbol lookup error, undefined symbol: _ZN9QMetaType22

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 2 Posters 4.5k 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.
  • A Offline
    A Offline
    Andrey Shmelew
    wrote on last edited by
    #1

    Hello !!!
    I have a linux app that uses QCustomPlot.
    When i click on plots' axis, app is going to die, and the error appears:

    "C:/SysGCC/Beaglebone/arm-linux-gnueabihf/sysroot/usr/local/qt5/examples/quick/demos/untitled2: symbol lookup error: C:/SysGCC/Beaglebone/arm-linux-gnueabihf/sysroot/usr/local/qt5/examples/quick/demos/untitled2: undefined symbol: _ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject"

    Does anybody know what is the reason of this?

    kshegunovK 1 Reply Last reply
    0
    • A Andrey Shmelew

      Hello !!!
      I have a linux app that uses QCustomPlot.
      When i click on plots' axis, app is going to die, and the error appears:

      "C:/SysGCC/Beaglebone/arm-linux-gnueabihf/sysroot/usr/local/qt5/examples/quick/demos/untitled2: symbol lookup error: C:/SysGCC/Beaglebone/arm-linux-gnueabihf/sysroot/usr/local/qt5/examples/quick/demos/untitled2: undefined symbol: _ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject"

      Does anybody know what is the reason of this?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      You mean that the application starts, and only after clicking someplace on the screen it dies with that error?

      Read and abide by the Qt Code of Conduct

      A 1 Reply Last reply
      0
      • kshegunovK kshegunov

        You mean that the application starts, and only after clicking someplace on the screen it dies with that error?

        A Offline
        A Offline
        Andrey Shmelew
        wrote on last edited by Andrey Shmelew
        #3

        exactly, you're right! And these places are axis of QCustomPlot (marked pinky) alt text

        kshegunovK 1 Reply Last reply
        0
        • A Andrey Shmelew

          exactly, you're right! And these places are axis of QCustomPlot (marked pinky) alt text

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          Apparently there's a call to:

          QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)
          

          which can't be resolved, but that's a mighty strange error to get during runtime. Can you post some code of how you setup the plot?

          Read and abide by the Qt Code of Conduct

          A 1 Reply Last reply
          0
          • kshegunovK kshegunov

            Apparently there's a call to:

            QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)
            

            which can't be resolved, but that's a mighty strange error to get during runtime. Can you post some code of how you setup the plot?

            A Offline
            A Offline
            Andrey Shmelew
            wrote on last edited by Andrey Shmelew
            #5

            ui_mainwindow.h

            #include <../../qcustomplot.h>
            class Ui_MainWindow
            {
            public:
                ...stuff...
                QCustomPlot *customPlot;
            .....
            }
            
            void setupUi(QMainWindow *MainWindow)
            {
            ...stuff....
             customPlot = new QCustomPlot(centralWidget);
                    customPlot->setObjectName(QStringLiteral("customPlot"));
                    customPlot->setGeometry(QRect(10, 50, 1251, 451));
            customPlot->setSizePolicy(sizePolicy);
             customPlot->setFont(font);
                    customPlot->setFocusPolicy(Qt::ClickFocus);
            ...stuff....
            }
            

            ui_mainwinw.cpp

            MainWindow::MainWindow(QWidget *parent) :
                QMainWindow(parent),
                ui(new Ui::MainWindow)
            {
            .....stuff...
                ui->customPlot->xAxis->setRange(-8, 600);
                ui->customPlot->yAxis->setRange(-5, 110);
               ui->customPlot->clearGraphs();
            ...stuff....
            }
            

            updategraph.cpp

            {
             ui->customPlot->addGraph();
                ui->customPlot->graph()->setName("graph #1");
                ui->customPlot->graph()->setData(xx1, yy1);
            ui->customPlot->replot();
            }
            
            kshegunovK 1 Reply Last reply
            0
            • A Andrey Shmelew

              ui_mainwindow.h

              #include <../../qcustomplot.h>
              class Ui_MainWindow
              {
              public:
                  ...stuff...
                  QCustomPlot *customPlot;
              .....
              }
              
              void setupUi(QMainWindow *MainWindow)
              {
              ...stuff....
               customPlot = new QCustomPlot(centralWidget);
                      customPlot->setObjectName(QStringLiteral("customPlot"));
                      customPlot->setGeometry(QRect(10, 50, 1251, 451));
              customPlot->setSizePolicy(sizePolicy);
               customPlot->setFont(font);
                      customPlot->setFocusPolicy(Qt::ClickFocus);
              ...stuff....
              }
              

              ui_mainwinw.cpp

              MainWindow::MainWindow(QWidget *parent) :
                  QMainWindow(parent),
                  ui(new Ui::MainWindow)
              {
              .....stuff...
                  ui->customPlot->xAxis->setRange(-8, 600);
                  ui->customPlot->yAxis->setRange(-5, 110);
                 ui->customPlot->clearGraphs();
              ...stuff....
              }
              

              updategraph.cpp

              {
               ui->customPlot->addGraph();
                  ui->customPlot->graph()->setName("graph #1");
                  ui->customPlot->graph()->setData(xx1, yy1);
              ui->customPlot->replot();
              }
              
              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by
              #6

              I don't see anything obviously wrong. Is it possible you have an outdated build of QCustomPlot (e.g. if you upgraded Qt, but didn't update QCustomPlot)? Also is it possible you updated QCustomPlot but didn't rebuild your application (their code isn't binary compatible)? And finally, could you pull a stack trace when the error occurs?

              Read and abide by the Qt Code of Conduct

              A 1 Reply Last reply
              2
              • kshegunovK kshegunov

                I don't see anything obviously wrong. Is it possible you have an outdated build of QCustomPlot (e.g. if you upgraded Qt, but didn't update QCustomPlot)? Also is it possible you updated QCustomPlot but didn't rebuild your application (their code isn't binary compatible)? And finally, could you pull a stack trace when the error occurs?

                A Offline
                A Offline
                Andrey Shmelew
                wrote on last edited by
                #7

                @kshegunov
                thanks for answer,
                i've played with versions of QCustomPlot (downloaded an older versions) and it brings no results, the error still kills my app... i dont know about stack trace

                A kshegunovK 2 Replies Last reply
                0
                • A Andrey Shmelew

                  @kshegunov
                  thanks for answer,
                  i've played with versions of QCustomPlot (downloaded an older versions) and it brings no results, the error still kills my app... i dont know about stack trace

                  A Offline
                  A Offline
                  Andrey Shmelew
                  wrote on last edited by Andrey Shmelew
                  #8

                  @Andrey-Shmelew
                  any idea how to hack it? for example, place a transparent rectangle on axis. It should not allow to touch the axis.. I know its not good

                  1 Reply Last reply
                  0
                  • A Andrey Shmelew

                    @kshegunov
                    thanks for answer,
                    i've played with versions of QCustomPlot (downloaded an older versions) and it brings no results, the error still kills my app... i dont know about stack trace

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #9

                    Well, I still think it's some kind of incompatibility between versions. What about building QCustomPlot yourself? You should also be able to extract a stack trace from the app when you run it in debug mode. After the crash there's a "call stack" (or something like this) in the debug view of Creator.

                    Read and abide by the 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