Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compilation Issue with QWS example
Forum Updated to NodeBB v4.3 + New Features

Compilation Issue with QWS example

Scheduled Pinned Locked Moved General and Desktop
18 Posts 4 Posters 15.2k 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.
  • Z Offline
    Z Offline
    ZapB
    wrote on last edited by
    #2

    Is your Qt build as an embeddd Qt build? The QWSServer class (and some others) are only built if you configure Qt as embedded.

    Nokia Certified Qt Specialist
    Interested in hearing about Qt related work

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rahulpd5
      wrote on last edited by
      #3

      Ok..Is there any way to build same for non embedded platform ( For Desktop).

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        ZapB
        wrote on last edited by
        #4

        No. QWS is the windowing system provided by Qt for embedded where their is no other windowing system in place. The QWS stuff is only built when configuring for embedded.

        Having said that, you can of course build Qt in an embedded configuration but not cross compiled so that it runs on your desktop machine. There are a few ways this can work in practise:

        You run the app outside of X so that it draws directly to the Linux framebuffer

        You run the app within X but with the qvfb app running. This qvfb app is a virtual framebuffer. This is very useful even when developing for an embedded target system as it allow you to run your app locally.

        You run the app but force the display out over vnc. You then of course need a vnc viewer to actually see anything.

        It is actually possible to run the app on a framebuffer and vnc at the same time.

        Please come back if any of these strikes you as useful for what you are doing.

        Nokia Certified Qt Specialist
        Interested in hearing about Qt related work

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rahulpd5
          wrote on last edited by
          #5

          Thanks ZapB..While configuring/building the Qt as embedded i did below step-

          ./configure -embedded i32 -xplatform linux-g++ -I /usr/lib/glib-2.0/include/*

          But i am getting below error while build -

          .obj/release-shared-emb-i32/qthread_unix.o: In function QThreadPrivate::createEventDispatcher(QThreadData*)': qthread_unix.cpp:(.text+0x680): undefined reference to QEventDispatcherGlib::QEventDispatcherGlib(QObject*)'
          qthread_unix.cpp:(.text+0x721): undefined reference to QEventDispatcherGlib::versionSupported()' .obj/release-shared-emb-i32/qcoreapplication.o: In function QCoreApplicationPrivate::createEventDispatcher()':
          qcoreapplication.cpp:(.text+0x1727): undefined reference to QEventDispatcherGlib::QEventDispatcherGlib(QObject*)' qcoreapplication.cpp:(.text+0x1761): undefined reference to QEventDispatcherGlib::versionSupported()'
          .obj/release-shared-emb-i32/qtextcodec.o: In function setup()': qtextcodec.cpp:(.text+0x2014): undefined reference to QIconvCodec::QIconvCodec()'
          collect2: ld returned 1 exit status
          make[1]: *** [../../lib/libQtCore.so.4.6.3] Error 1
          make[1]: Leaving directory `/home/embeddedQt/qtsdk-2010.04/qt/src/corelib'
          make: *** [sub-corelib-make_default-ordered] Error 2

          On my Desktop glib is already installed..what could be the reason of above?

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZapB
            wrote on last edited by
            #6

            You also need to have glib available in your cross-compiling sysroot. Ie if you want support for a feature then you need that feature available in your cross-environment. If not then disable it via the configure line.

            Nokia Certified Qt Specialist
            Interested in hearing about Qt related work

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rahulpd5
              wrote on last edited by
              #7

              I am enabling glib through below command

              ./configure -embedded i32 -xplatform linux-g++ -qvfb -glib

              But it says-
              "Glib support cannot be enabled due to functionality tests!"

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZapB
                wrote on last edited by
                #8

                Yes, that is why I said to disable it if it is not available in your cross compiling sysroot. Try passing in -no-glib to your Qt configure line. When trying things like this it also often helps to pass in the -verbose argument so that you can see what tests pass/fail.

                If you still can't get it working please paste in the relevant section of the configure process.

                Nokia Certified Qt Specialist
                Interested in hearing about Qt related work

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rahulpd5
                  wrote on last edited by
                  #9

                  Hey ZapB I Tried as per your comment and finally able to build. Thanks for your quick support. I gave below command -

                  ./configure -embedded x86 -xplatform linux-g++ -no-glib -no-iconv -qvfb

                  I am also able to run QWS/framebuffer example outside the X which draws 3 rectangle using qvfb.Which perfact works for me.

                  But still getting compilation error on mousecalibration example-
                  /opt/qtsdk-2010.04/qt/examples/qws/mousecalibration/calibration.cpp:141: undefined reference to QWSServer::mouseHandler()

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    ZapB
                    wrote on last edited by
                    #10

                    When you are running qmake on the application .pro file, are you sure that you are running the correct version of qmake. ie the one built as part of your Qt-embedded build?

                    Where is your Qt-embedded installed to? Can you post the output of:

                    @which qmake@

                    and

                    @qmake -r@

                    and

                    @make@

                    Hopefully that will show us which libs the app is trying to link to and whether they are the right ones or not.

                    I'm offline for periods this week so it may take me a day or more to get back to you.

                    Good luck!

                    Nokia Certified Qt Specialist
                    Interested in hearing about Qt related work

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      rahulpd5
                      wrote on last edited by
                      #11

                      Yes..My embedded Qt is installed on home/embeddedQt/qtsdk-2010.04/qt/

                      Output of which qmake
                      /home/embeddedQt/qtsdk-2010.0Reading /home/embeddedQt/qtsdk-2010.04/qt/examples

                      Outputof qmake -r

                      /qws/framebuffer/framebuffer.pro

                      Reading /home/embeddedQt/qtsdk-2010.04/qt/examples/qws/framebuffer/framebuffer.pro
                      Reading /home/embeddedQt/qtsdk-2010.04/qt/examples/qws/mousecalibration/mousecalibration.pro
                      Reading /home/embeddedQt/qtsdk-2010.04/qt/examples/qws/simpledecoration/simpledecoration.pro

                      Output of make -

                      g++ -Wl,-rpath-link,/home/embeddedQt/qtsdk-2010.04/qt/lib -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.6.3-i386/lib -Wl,-rpath,/usr/local/Trolltech/QtEmbedded-4.6.3-i386/lib -o mousecalibration .obj/release-shared-emb-x86/calibration.o .obj/release-shared-emb-x86/scribblewidget.o .obj/release-shared-emb-x86/main.o -L/home/embeddedQt/qtsdk-2010.04/qt/lib -lQtGui -L/home/embeddedQt/qtsdk-2010.04/qt/lib -lQtNetwork -lQtCore -lpthread
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::accept()': calibration.cpp:(.text+0xb): undefined reference to QWSServer::mouseHandler()'
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::mouseReleaseEvent(QMouseEvent*)': calibration.cpp:(.text+0x39): undefined reference to qt_screen'
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::exec()': calibration.cpp:(.text+0xd0): undefined reference to QWSServer::mouseHandler()'
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::Calibration()': calibration.cpp:(.text+0x283): undefined reference to qt_screen'
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::Calibration()': calibration.cpp:(.text+0x403): undefined reference to qt_screen'
                      .obj/release-shared-emb-x86/calibration.o: In function Calibration::paintEvent(QPaintEvent*)': calibration.cpp:(.text+0x51f): undefined reference to qt_screen'
                      .obj/release-shared-emb-x86/main.o: In function main': main.cpp:(.text+0x3d): undefined reference to QWSServer::mouseHandler()'
                      collect2: ld returned 1 exit status
                      make: *** [mousecalibration] Error 1

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Scylla
                        wrote on last edited by
                        #12

                        Do you have another Qt installation in path? Try the absolutpath to your embedded qmake!

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          rahulpd5
                          wrote on last edited by
                          #13

                          Initially while making setup i downloaded below Qt-4.6.3 version complete SDK and installed it on Desktop

                          ./qt-sdk-linux-x86-opensource-2010.05.1.bin

                          The Desktop Qt installed path was /opt. Then i took the copy of Desktop Qt qtsdk-2010.04 folder on /home and i configure the Qt as embedded and built it. While build i am giving the path of Qt embedded only.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Scylla
                            wrote on last edited by
                            #14

                            Have you tried /pathtoyourqt-embedded/qmake *.pro && make?

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              rahulpd5
                              wrote on last edited by
                              #15

                              Hi ZapB, Scylla,

                              I got the solution today..the problem was with my qt embedded installation. I was using the sysroot qt sdk which i got after running the qt-sdk-linux-x86-opensource-2010.05.1.bin.It built fine with default configuration but for embedded configuration (./configure -embedded x86 -xplatform linux-g++ -no-glib -no-iconv -qvfb) it gave me build issue with QWS example.
                              Then i downloaded the qt for embedded linux version 4.6.2 (qt-everywhere-opensource-src-4.6.2.tar.gz) which works fine for qws.
                              ZapB thanks alot for your support for finally fixing the issue. ..

                              1 Reply Last reply
                              0
                              • V Offline
                                V Offline
                                Vijaeendra
                                wrote on last edited by
                                #16

                                Hi ZapB. I m a beginner in Qt. Is there anyway I can implement and use the QWS on my Desktop Linux system? or Is there any way I can emulate the embedded Linux on the present Linux system.
                                Also, is there a X Window(client/server) equivalent in Qt?

                                Awaiting your reply.
                                Thank you.

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  rahulpd5
                                  wrote on last edited by
                                  #17

                                  Yes you can use qws on your Desttop linux.Download qt-everywhere-opensource-src-4.6.2.tar.gz and gothrough READ.
                                  Configure -
                                  ./configure -embedded x86 -xplatform linux-g++
                                  make;make install and run the program using -qws as command line argument from console.
                                  Note- you have to go out from xserver to use qws

                                  GoodLuck-
                                  Rahul Pandey

                                  1 Reply Last reply
                                  0
                                  • V Offline
                                    V Offline
                                    Vijaeendra
                                    wrote on last edited by
                                    #18

                                    Thank you Rahul Pandey. I ll give it a try n get back to u.

                                    Regards,
                                    Vijaeendra Simha

                                    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