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 Updated to NodeBB v4.3 + New Features

symbol lookup error, undefined symbol: _ZN9QMetaType22

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 2 Posters 4.5k 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.
  • A Offline
    A Offline
    Andrey Shmelew
    wrote on 8 Feb 2017, 10:51 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?

    K 1 Reply Last reply 8 Feb 2017, 11:47
    0
    • A Andrey Shmelew
      8 Feb 2017, 10:51

      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?

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 8 Feb 2017, 11:47 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 9 Feb 2017, 03:07
      0
      • K kshegunov
        8 Feb 2017, 11:47

        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 9 Feb 2017, 03:07 last edited by Andrey Shmelew 2 Sept 2017, 03:07
        #3

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

        K 1 Reply Last reply 9 Feb 2017, 10:47
        0
        • A Andrey Shmelew
          9 Feb 2017, 03:07

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

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 9 Feb 2017, 10:47 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 10 Feb 2017, 03:33
          0
          • K kshegunov
            9 Feb 2017, 10:47

            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 10 Feb 2017, 03:33 last edited by Andrey Shmelew 2 Oct 2017, 04:11
            #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();
            }
            
            K 1 Reply Last reply 11 Feb 2017, 12:17
            0
            • A Andrey Shmelew
              10 Feb 2017, 03:33

              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();
              }
              
              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 11 Feb 2017, 12:17 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 13 Feb 2017, 11:44
              2
              • K kshegunov
                11 Feb 2017, 12:17

                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 13 Feb 2017, 11:44 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 K 2 Replies Last reply 14 Feb 2017, 03:15
                0
                • A Andrey Shmelew
                  13 Feb 2017, 11:44

                  @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 14 Feb 2017, 03:15 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
                    13 Feb 2017, 11:44

                    @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

                    K Offline
                    K Offline
                    kshegunov
                    Moderators
                    wrote on 15 Feb 2017, 23:39 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

                    9/9

                    15 Feb 2017, 23:39

                    • Login

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