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 rocket42
    #1

    hello everyone
    i am using qt to develop apps for Beaglebone black board
    My Desktop:

    • Ubuntu 14.04LTS
    • qt5.5.1 opensource, qtcreator 3.5.1 opensource
      I already compile qt4.8.2 for Beaglebone black follow:
      http://exploringbeaglebone.com/chapter6/
      And i tried to compile a little app by command line, this little app run on beaglebone black very smoothly.
      But now i want to develop on qtcreator ide. So i set up qtcreator follow:
      http://developer.toradex.com/knowledge-base/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux#Configure_Qt_Creator
      but when run app built by qtcreator. it emit error:
      undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent
      please show me how to solve it
      i am waiting your response as soon as

    hung.rocket42@gmail.com

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

      Hi,

      Are you trying to build your Qt 4 code with Qt 5 ? If so the QWS related classes have been removed from Qt.

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

        thank SGaist
        yes, i want to build Qt4 code base on Qt5.
        please show me how to remove QWS related classes?

        hung.rocket42@gmail.com

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

          Do you have any in your code ?

          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
            #5

            i don't see QWS classe in my code

            hung.rocket42@gmail.com

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

              Are you trying to run a Qt 4 build of your application against Qt 5 on your device ?

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

              R 1 Reply Last reply
              0
              • SGaistS SGaist

                Are you trying to run a Qt 4 build of your application against Qt 5 on your device ?

                R Offline
                R Offline
                rocket42
                wrote on last edited by rocket42
                #7

                @SGaist said:

                Are you trying to run a Qt 4 build of your application against Qt 5 on your device ?

                i still don't try it.
                but i just have ran application with option -qws.
                but it don't discard this error.

                hung.rocket42@gmail.com

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

                  What version of Qt do you have on your target ? What linux distribution are you running on it ?

                  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
                    #9

                    my target is using qt4
                    my linux distribution is ubuntu lts 14.04

                    hung.rocket42@gmail.com

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

                      You also have an Ubuntu 14.04 running on your target ? If so, then you have a classic "desktop like" build of Qt on your target. That's why it can find the symbols related to QWS. Either rebuild your Qt without the embedded option or install your cross-compiled Qt 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
                        #11

                        No, my target use Angstrom os, which was distributed with board

                        hung.rocket42@gmail.com

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

                          Then check how Qt was built for Angstrom but I suspect that it's a desktop like build rather than an 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
                            #13

                            I found cause of this error, but i dont know how to solve it. That is:
                            when create new project on Qt(Ctr+N). Qt automatically create new class called mainwindow
                            and automatically create code in main.cpp which show mainwindow. in main.cpp:
                            MainWindow w;
                            w.show();
                            if build, then run, this error raised
                            but i replace this two command in main.cpp as following:
                            ...
                            #include <QMainWindow>
                            int main(int argc, char *argv[])
                            {
                            QApplication a(argc, argv);

                            QMainWindow q;
                            q.show();
                            
                            return a.exec();
                            

                            }
                            it run ok.
                            we see that mainwindow class inherite from QMainWindow class.
                            when show QMainWindow is ok, but show mainwindow is not ok
                            that isn't understand

                            hung.rocket42@gmail.com

                            1 Reply Last reply
                            0
                            • jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              Do you do something special in MainWindows constructor?

                              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
                                #15

                                No, Qt automatically create it. i don't change ever

                                hung.rocket42@gmail.com

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

                                  Silly question but, are you using the same kit for both projects ?

                                  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
                                    #17

                                    yes, I use same kit for two

                                    hung.rocket42@gmail.com

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

                                      Then as @jsulm asked, what are you doing in your MainWindow class that differs it from QMainWindow ?

                                      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
                                        #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

                                          • Login

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