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. How to run QT application on X-window of the embedded platform
QtWS25 Last Chance

How to run QT application on X-window of the embedded platform

Scheduled Pinned Locked Moved Mobile and Embedded
32 Posts 4 Posters 32.9k 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.
  • U Offline
    U Offline
    uniquez
    wrote on 14 May 2012, 15:13 last edited by
    #3

    Thank for you help very much.

    From what you said, is my Ubuntu system not embedded, even if the system is based on ARM-platform? If it is true, how to configure these parameters : -arm -xplatform qws/linux-arm-gnueabi-g++ -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -qt-mouse-linuxinput ? Because my QT-application will run the ARM-platform, I think these parameters are needed, at least,QT-lib will be compiled using qws/linux-arm-gnueabi-g++.

    By the way, I have a little confuse with the question: in this sense, whether I need compile QVFB to run QT application on my system(ARM+Ubuntu+X-window)?

    Sorry for my bad English. If you understand what I said, please give me some help again.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Serg
      wrote on 14 May 2012, 16:34 last edited by
      #4

      bq. By the way, I have a little confuse with the question: in this sense, whether I need compile QVFB to run QT application on my system(ARM+Ubuntu+X-window)?

      No, you don't need it.

      bq. From what you said, is my Ubuntu system not embedded, even if the system is based on ARM-platform? If it is true, how to configure these parameters : -arm -xplatform qws/linux-arm-gnueabi-g++ -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -qt-mouse-linuxinput ?

      "-no-gfx-vnc", "-no-gfx-qvfb" - it's default options, just miss it.

      "-qt-gfx-linuxfb", "-qt-gfx-transformed", "-qt-gfx-multiscreen", "-qt-kbd-linuxinput", "-qt-mouse-linuxinput" - it's screen, keyboard and mouse handling options. Miss it and use default values because X11 system manages this things.

      If you compiling Qt on you Ubuntu(arm), try to use default "./configure" options. It will automatically detect your processor type. If you use cross-compilation then you should specify target platform as "linux-arm-gnueabi-g++" (not qws), check "./configure --help".

      1 Reply Last reply
      0
      • U Offline
        U Offline
        uniquez
        wrote on 15 May 2012, 08:39 last edited by
        #5

        Thanks for you help me again.

        Now I am more clearer to my question. I will cross-compile QT-lib and QT-application on my X86-computer, and I will download the compiled QT-lib and QT-application on my EVM-board((ARM+Ubuntu+X-window)) to run. So I need using my cross-compilation(linux-arm-gnueabi-g++) to cross-compile.

        one question i want to make sure:
        [quote author="Serg" date="1337013285"]bq. you should specify target platform as “linux-arm-gnueabi-g++” (not qws),[/quote]
        what does this sentence mean? do you mean configure like this:"./configure -xplatform qws/linux-arm-gnueabi-g++". Especially, what does *''(not qws)" *mean?

        Or you can tell me more details to "./configure", yeah i have check “./configure —help”.
        Thank you so much for your warm-heart!!!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Serg
          wrote on 15 May 2012, 09:50 last edited by
          #6

          -xplatform used with -embedded only, you should use -platform.

          I'm not sure, but I think it will be correct: "./confugure -platform arm-none-linux-gnueabi-g++". Also you should correctly configure environment variables (e.g. CC, LD, etc.) on your host system for cross-compilation (check cross-compiler documentation).

          1 Reply Last reply
          0
          • U Offline
            U Offline
            uniquez
            wrote on 17 May 2012, 00:54 last edited by
            #7

            Yesterday I tried to compile QT-LIB following what you said. However, when I compiling the qt-everywhere-opensource-src-4.8.1, there is a error :

            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
            /home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")

            My configure is "./confugure -platform arm-none-linux-gnueabi-g++" as you told me , and I think I configure environment variables correctly.
            Can you tell me where someting wrong is? Thank you very much.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Serg
              wrote on 17 May 2012, 05:10 last edited by
              #8

              You should use qmake for target platform (that runs on x86, but produces output for arm), not native qmake.

              1 Reply Last reply
              0
              • U Offline
                U Offline
                uniquez
                wrote on 21 May 2012, 06:24 last edited by
                #9

                Sorry to reply later beacause I was busy for other things these days.

                [quote author="Serg" date="1337231425"]You should use qmake for target platform (that runs on x86, but produces output for arm), not native qmake.[/quote]

                I think "qmake" is a tool used for generating Makefile, so it runs on x86, and produces output(Makefile) for X86 not for arm. Is that true?

                By the way, I find an other way to get qt-lib for X11 based arm. I link the system with internet, and use “apt-get instal libqt4-dev”, then the ubuntu can download qt-lib for arm. However, when I run a QT test-program(compiled linking downloaded QT-lib) on my system, the program can output a window, but have an error:"undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent". Can you tell me what wrong about this way to get QT-lib and run QT-program.

                Thanks for your warm-heart again!!!

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Serg
                  wrote on 21 May 2012, 10:25 last edited by
                  #10

                  bq. I think “qmake” is a tool used for generating Makefile, so it runs on x86, and produces output(Makefile) for X86 not for arm. Is that true?

                  The qmake tool requires a platform and compiler specific qmake.conf file describing the various default values, to generate the appropriate Makefiles. You should use correct qmake.conf file.

                  bq. However, when I run a QT test-program(compiled linking downloaded QT-lib) on my system, the program can output a window, but have an error:“undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent”. Can you tell me what wrong about this way to get QT-lib and run QT-program.

                  Looks like your program uses QWidget::qwsEvent(), that is not available in non-embedded linux environments. "Check this thread":http://qt-project.org/forums/viewthread/3043 .

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    uniquez
                    wrote on 21 May 2012, 10:51 last edited by
                    #11

                    The second question.
                    My test program can run on Ubuntu on my PC, which is non-embendded linux environment too. And I am sure my test program (just a MainWindow) not using QWidget::qwsEvent()。

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      uniquez
                      wrote on 21 May 2012, 11:05 last edited by
                      #12

                      The first question.
                      When I use "./configure -xplatform linux-arm-gnueabi-g++ "to configure, there is no error about "/home/xushaofan/qt_4.8.1_pkg/qt-x11-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting “)”)", but it generate an error:

                      "Basic XLib functionality test failed!
                      You might need to modify the include and library search paths by editing
                      QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/mkspecs/linux-arm-gnueabi-g++."

                      I find the variables of QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 is in the /mkspecs/common/linux.conf, and I change the variables to XLib's path, but this error remain.

                      How to solve this problem?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Serg
                        wrote on 21 May 2012, 11:09 last edited by
                        #13

                        qt-everywhere-opensource-src-x.y.z/mkspecs directory used for (cross) compiling Qt for various targets.
                        qt-everywhere-opensource-src-x.y.z/mkspecs/qws directory used for (cross) compiling Qt embedded for various targets.

                        So, I checked "mkspecs directory":http://qt.gitorious.org/qt/qt/trees/4.8/mkspecs and found a mistake.

                        bq. I’m not sure, but I think it will be correct: “./configure -platform arm-none-linux-gnueabi-g++”.

                        Correct is: "./configure -platform linux-arm-gnueabi-g++".

                        1 Reply Last reply
                        0
                        • U Offline
                          U Offline
                          uniquez
                          wrote on 21 May 2012, 11:25 last edited by
                          #14

                          Correct is: “./configure -platform linux-arm-gnueabi-g++”.

                          But in /mkspecs directory, there is no folder of "linux-arm-gnueabi-g++",and my qt opensource's version is 4.8.1. So I just copied /mkspecs/qws/linux-arm-gnueabi-g++ to /mkspecs. I think what I did is not true, but I dont know how to get linux-arm-gnueabi-g++ in /mkspecs.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Serg
                            wrote on 21 May 2012, 11:34 last edited by
                            #15

                            About second question.
                            Your qt test program was built on arm system as a native program? Can you show ldd output?

                            bq. But in /mkspecs directory, there is no folder of “linux-arm-gnueabi-g++”,and my qt opensource’s version is 4.8.1. So I just copied /mkspecs/qws/linux-arm-gnueabi-g++ to /mkspecs. I think what I did is not true, but I dont know how to get linux-arm-gnueabi-g++ in /mkspecs.

                            Copy it from qt.gitorious, Are you checked the link "mkspecs directory":http://qt.gitorious.org/qt/qt/trees/4.8/mkspecs ?

                            1 Reply Last reply
                            0
                            • U Offline
                              U Offline
                              uniquez
                              wrote on 21 May 2012, 12:03 last edited by
                              #16

                              My cross compiler is arm-none-linux-gnueabi-g++ not linux-arm-gnueabi-g++.

                              I copy the folder of linux-arm-gnueabi-g++ from qt.gitorious to /mkspecs, and I replace "linux-arm-gnueabi-g++" for "arm-none-linux-gnueabi-g++ ". Then I configure "./configure -platform linux-arm-gnueabi-g++",there is two errors:

                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/bin/qmake: 1: Syntax error: word unexpected (expecting ")")
                              Basic XLib functionality test failed!
                              You might need to modify the include and library search paths by editing
                              QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/mkspecs/linux-arm-gnueabi-g++.

                              But if I configure "./configure -xplatform linux-arm-gnueabi-g++" after clean configure, there just an error:

                              Basic XLib functionality test failed!
                              You might need to modify the include and library search paths by editing
                              QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/xushaofan/qt_4.8.1_pkg/qt-everywhere-opensource-src-4.8.1/mkspecs/linux-arm-gnueabi-g++.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Serg
                                wrote on 21 May 2012, 13:07 last edited by
                                #17

                                So, there are two ways:

                                1. Write your own mkspec for arm-none-linux-gnueabi-g++ compiler (or find in google). Then ./configure -arch arm -xplatform arm-none-linux-gnueabi-g++;
                                2. "sudo apt-get install g++-arm-linux-gnueabi" and try to use mkspec from qt.gitorius. Then ./configure -arch arm -xplatform linux-arm-gnueabi-g++.

                                bq. Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11

                                You need to specify X11 include files and libraries, arm libs!

                                1 Reply Last reply
                                0
                                • U Offline
                                  U Offline
                                  uniquez
                                  wrote on 21 May 2012, 14:59 last edited by
                                  #18

                                  You need to specify X11 include files and libraries, arm libs!

                                  ================================

                                  I have specified X11 include files and libraries(for arm)' path by modifing linux.conf in /mkspecs/common, but the error remain. Is it right?

                                  It is too later tonight, I will compile QT-lib following what you said tomorrow.
                                  Anyway, thank you help me again and again.

                                  1 Reply Last reply
                                  0
                                  • U Offline
                                    U Offline
                                    uniquez
                                    wrote on 21 May 2012, 15:19 last edited by
                                    #19

                                    By the way, the X11 include files and libraries are provided in filesytems by TI ezsdk.

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      Serg
                                      wrote on 21 May 2012, 16:45 last edited by
                                      #20

                                      bq. I have specified X11 include files and libraries(for arm)’ path by modifing linux.conf in /mkspecs/common, but the error remain. Is it right?

                                      I'm think it's right.

                                      This error can be when libXext is missed.
                                      Here is "Qt for X11 requirements":http://qt-project.org/doc/qt-4.8/requirements-x11.html. Ensure that you have all required libs.

                                      1 Reply Last reply
                                      0
                                      • U Offline
                                        U Offline
                                        uniquez
                                        wrote on 22 May 2012, 01:37 last edited by
                                        #21

                                        One more question, when I configure my QT-lib compiling using "./configure -xplatform linux-arm-gnueabi-g++",
                                        it outputs "You have not explicitly asked to use pkg-config and are cross-compiling.
                                        pkg-config will not be used to automatically query cflag/lib parameters for
                                        dependencies"
                                        But when I use "./configure", there is no that message.

                                        Although it is not en error, I think something is not configured right.

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          Serg
                                          wrote on 22 May 2012, 04:38 last edited by
                                          #22

                                          Try it: ./configure -arch arm -xplatform linux-arm-gnueabi-g++ -force-pkg-config

                                          1 Reply Last reply
                                          0

                                          12/32

                                          21 May 2012, 11:05

                                          • Login

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