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. [Error] undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent
Qt 6.11 is out! See what's new in the release blog

[Error] undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
31 Posts 3 Posters 10.7k 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.
  • R Offline
    R Offline
    rocket42
    wrote on last edited by
    #19

    i don't change anything, MainWindow class is created automatically by Qt creator
    let me post code here. i can't find how to attach it
    mainwindow.h content:
    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    #include <QMainWindow>
    namespace Ui {
    class MainWindow;
    }
    class MainWindow : public QMainWindow
    {
    Q_OBJECT
    public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    private:
    Ui::MainWindow *ui;
    };
    #endif // MAINWINDOW_H

    Mainwindow.cpp content:
    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    }
    MainWindow::~MainWindow()
    {
    delete ui;
    }

    hung.rocket42@gmail.com

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

      Then there must be something else with your project.

      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
      • R Offline
        R Offline
        rocket42
        wrote on last edited by rocket42
        #21

        I created C++ class manually, this class calls abc and inherited from QMainWindow class
        source code of abc.h:

        #ifndef ABC_H
        #define ABC_H
        #include <QMainWindow>
        class abc : public QMainWindow
        {
            Q_OBJECT
        public:
            explicit abc(QWidget *parent = 0);
        signals:
        public slots:
        };
        #endif // ABC_H
        

        source code of abc.cpp:

        #include "abc.h"
        abc::abc(QWidget *parent) : QMainWindow(parent)
        {
        
        }
        

        source of main.cpp:

        #include "mainwindow.h"
        #include <QApplication>
        #include "abc.h"
        
        int main(int argc, char *argv[])
        {
            QApplication a(argc, argv);
        //    MainWindow w;
        //    w.show();
        //    QMainWindow q;
        //    q.show();
            abc abc1;
            abc1.show();
            return a.exec();
        }
        

        when app run on beagbone black, this error still rises

        hung.rocket42@gmail.com

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

          There's something illogical here so lets try to summaries things:
          First case:

          1. You create a default widget project with Qt Creator
          2. Replace the MainWindow call in main.cpp by a QMainWindow
          3. Build it with your cross-compiled Qt
          4. Runs on BBB

          Second case:

          1. You create a default widget project with Qt Creator
          2. You keep the MainWindow class
          3. Build it with your cross-compiled Qt
          4. Fails to run on BBB complaining about QWS

          In both case, you use the exact same version of Qt to build (i.e. cross-compile) the projects.

          Is the summary correct ?

          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
          • R Offline
            R Offline
            rocket42
            wrote on last edited by rocket42
            #23

            yes, you are right. but you miss the third case.
            because i have three cases.
            the third case:

            • I create a default widget project with Qt Creator
            • I create a new class (name is ABC) which inherite from QMainWindow (source code I posted at #21)
            • Replace the MainWindow class in main.cpp by ABC class
            • Build it with your cross-compiled Qt
            • Fails to run on BBB complaining about QWS
              All of three cases, i use same KIT (included device, compiler, qmake,...)

            hung.rocket42@gmail.com

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

              I must say that it defies logic...

              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
              • R Offline
                R Offline
                rocket42
                wrote on last edited by
                #25

                sorry, i don't understand
                all three cases is different.
                the third case i don't use class which automatically create by Qt creator, i created manually

                hung.rocket42@gmail.com

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

                  That's why it defies logic. I don't see why a simple derived class would trigger that error.

                  Can you run ldd on all three applications on your target and post the output ?

                  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
                  • R Offline
                    R Offline
                    rocket42
                    wrote on last edited by rocket42
                    #27

                    output of case1 (application run ok):
                    libQtGui.so.4 => /usr/lib/arm-linux-gnueabihf/libQtGui.so.4 (0xb681e000)
                    libQtCore.so.4 => /usr/lib/arm-linux-gnueabihf/libQtCore.so.4 (0xb6616000)
                    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb656b000)
                    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6547000)
                    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6462000)
                    libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb6436000)
                    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb641a000)
                    libaudio.so.2 => /usr/lib/arm-linux-gnueabihf/libaudio.so.2 (0xb6402000)
                    libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb6343000)
                    libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0xb6322000)
                    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6309000)
                    libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb62a4000)
                    libgobject-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 (0xb6265000)
                    libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0xb6258000)
                    libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0xb6240000)
                    libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0xb6232000)
                    libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb621f000)
                    libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6136000)
                    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb60cb000)
                    /lib/ld-linux-armhf.so.3 (0xb6f02000)
                    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb60c0000)
                    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb60b2000)
                    libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb6090000)
                    libXt.so.6 => /usr/lib/arm-linux-gnueabihf/libXt.so.6 (0xb604e000)
                    libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb6044000)
                    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb600b000)
                    libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0xb6001000)
                    libffi.so.5 => /usr/lib/arm-linux-gnueabihf/libffi.so.5 (0xb5fef000)
                    libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xb5fe3000)
                    libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb5fc8000)
                    libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb5fbd000)
                    output of case2 ( keep the MainWindow class):
                    libQtGui.so.4 => /usr/lib/arm-linux-gnueabihf/libQtGui.so.4 (0xb68fd000)
                    libQtCore.so.4 => /usr/lib/arm-linux-gnueabihf/libQtCore.so.4 (0xb66f5000)
                    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb664a000)
                    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6626000)
                    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6541000)
                    libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb6515000)
                    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb64f9000)
                    libaudio.so.2 => /usr/lib/arm-linux-gnueabihf/libaudio.so.2 (0xb64e1000)
                    libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb6422000)
                    libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0xb6401000)
                    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb63e8000)
                    libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb6383000)
                    libgobject-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 (0xb6344000)
                    libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0xb6337000)
                    libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0xb631f000)
                    libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0xb6311000)
                    libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb62fe000)
                    libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6215000)
                    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb61aa000)
                    /lib/ld-linux-armhf.so.3 (0xb6fe1000)
                    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb619f000)
                    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6191000)
                    libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb616f000)
                    libXt.so.6 => /usr/lib/arm-linux-gnueabihf/libXt.so.6 (0xb612d000)
                    libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb6123000)
                    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb60ea000)
                    libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0xb60e0000)
                    libffi.so.5 => /usr/lib/arm-linux-gnueabihf/libffi.so.5 (0xb60ce000)
                    libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xb60c2000)
                    libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb60a7000)
                    libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb609c000)
                    output of case3 (use abc class):
                    libQtGui.so.4 => /usr/lib/arm-linux-gnueabihf/libQtGui.so.4 (0xb681c000)
                    libQtCore.so.4 => /usr/lib/arm-linux-gnueabihf/libQtCore.so.4 (0xb6614000)
                    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6569000)
                    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6545000)
                    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6460000)
                    libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb6434000)
                    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6418000)
                    libaudio.so.2 => /usr/lib/arm-linux-gnueabihf/libaudio.so.2 (0xb6400000)
                    libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb6341000)
                    libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0xb6320000)
                    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6307000)
                    libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb62a2000)
                    libgobject-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 (0xb6263000)
                    libSM.so.6 => /usr/lib/arm-linux-gnueabihf/libSM.so.6 (0xb6256000)
                    libICE.so.6 => /usr/lib/arm-linux-gnueabihf/libICE.so.6 (0xb623e000)
                    libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0xb6230000)
                    libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb621d000)
                    libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6134000)
                    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb60c9000)
                    /lib/ld-linux-armhf.so.3 (0xb6f00000)
                    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb60be000)
                    librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb60b0000)
                    libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb608e000)
                    libXt.so.6 => /usr/lib/arm-linux-gnueabihf/libXt.so.6 (0xb604c000)
                    libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb6042000)
                    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb6009000)
                    libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0xb5fff000)
                    libffi.so.5 => /usr/lib/arm-linux-gnueabihf/libffi.so.5 (0xb5fed000)
                    libuuid.so.1 => /lib/arm-linux-gnueabihf/libuuid.so.1 (0xb5fe1000)
                    libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb5fc6000)
                    libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb5fbb000)

                    hung.rocket42@gmail.com

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

                      So there's indeed something funky going on. On your target you have your application loading the "desktop Qt 4" while you are cross-compiling on your machine.

                      So again, if you are using your application with QWS on the target, install your cross-compiled Qt on it. If not, cross-compile Qt 4 again but not for embedded.

                      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
                      • R Offline
                        R Offline
                        rocket42
                        wrote on last edited by rocket42
                        #29

                        output ldd of case 1 and case 2 is same.
                        case 1 is ok. but, case 2 is not ok. why?

                        hung.rocket42@gmail.com

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

                          Like I said, from your description that's pretty mysterious. Did you try to run them with your cross-compiled Qt installed on the target ?

                          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
                          • R Offline
                            R Offline
                            rocket42
                            wrote on last edited by
                            #31

                            please go to this site:
                            http://exploringbeaglebone.com/chapter11/#Step_2_Installing_Qt_48x
                            i follow it.

                            hung.rocket42@gmail.com

                            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