Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 4.8.0 / embedded / issue compiling example (examples/network/download/main.cpp)
QtWS25 Last Chance

Qt 4.8.0 / embedded / issue compiling example (examples/network/download/main.cpp)

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 2 Posters 5.2k 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.
  • G Offline
    G Offline
    gregm
    wrote on last edited by
    #1

    Hi,

    I'm cross-compiling qt 4.8.0 on ubuntu 10.04 host with a freescale imx53 as target.
    Compiling 4.7.2 works fine.
    After downloading qt-everywhere-opensource-src-4.8.0.tar.gz and configuring it with the following command line:
    @./configure -arch arm -xplatform linux-g++-mx5x -release -prefix /tftpboot/ltib/usr/local/Trolltech/Qt-4.8.0-mx5x-x11 -multimedia -phonon -phonon-backend -qt-gfx-linuxfb -qt-kbd-tty -little-endian -host-little-endian -fontconfig -sm -opengl es2 -static -qt-libjpeg@

    I get the following error:
    @/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ -c -pipe -O2 -fsigned-char -march=armv7-a -mfpu=neon -mfloat-abi=softfp -Wall -W -D_REENTRANT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../mkspecs/linux-g++-mx5x -I. -I../../../include/QtCore -I../../../include/QtNetwork -I../../../include -I. -I.moc/release-static -I/home/naratte/imx/mx53/11.09/ltib/rootfs/usr/include -I/home/naratte/imx/mx53/11.09/ltib/rootfs/usr/include/glib-2.0 -I/tftpboot/ltib/usr/lib/glib-2.0/include -I/tftpboot/ltib/usr/include/gstreamer-0.10 -I/tftpboot/ltib/usr/include/libxml2 -I/home/naratte/imx/mx53/11.09/ltib/rootfs/usr/include/freetype2 -I/home/naratte/imx/mx53/11.09/ltib/rootfs/usr/include/mysql -o .obj/release-static/main.o main.cpp
    /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++ -Wl,-rpath-link,/home/naratte/qt/4.8.0/qt-everywhere-opensource-src-4.8.0/lib -Wl,-O1 -Wl,-rpath,/tftpboot/ltib/usr/local/Trolltech/Qt-4.8.0-mx5x-x11/lib -Wl,-rpath,/tftpboot/ltib/usr/local/Trolltech/Qt-4.8.0-mx5x-x11/lib -o download .obj/release-static/main.o -L/home/naratte/qt/4.8.0/qt-everywhere-opensource-src-4.8.0/lib -L/tftpboot/ltib/usr/lib -lQtNetwork -L/home/naratte/qt/4.8.0/qt-everywhere-opensource-src-4.8.0/lib -L/tftpboot/ltib/usr/lib -lQtCore -lglib-2.0 -lgthread-2.0 -lgstreamer-0.10 -lxml2 -lgmodule-2.0 -lgobject-2.0 -lts -lasound -lxcb -lXau -lxcb-xlib -lXext -lXrender -lX11 -lfreetype -lexpat -ljpeg -lfontconfig -lSM -lICE -lpng -lgsl -lgsl-fsl -lEGL -lGLESv2 -lz -lm -ldl -lrt -lpthread
    .obj/release-static/main.o: In function main': main.cpp:(.text+0xd4c): undefined reference to QCoreApplication::QCoreApplication(int&, char**, int)'
    collect2: ld returned 1 exit status@

    Looking at src/corelib/kernel/qcoreapplication.h it shows the constructors for QCoreApplication are defined as:
    @
    #if defined(QT_BUILD_CORE_LIB) || defined(qdoc)
    QCoreApplication(int &argc, char **argv); // ### Qt5 remove
    #endif
    #if !defined(qdoc)
    QCoreApplication(int &argc, char **argv, int
    #if !defined(QT_BUILD_CORE_LIB)
    = ApplicationFlags
    #endif
    );
    #endif
    @

    Looks like the library QtCore is compiled with the constructor QCoreApplication(int &argc, char **argv);, whereas the example is compiled using the other constructor.

    What's a clean way to fix this issue?

    Thanks!
    Greg

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gregm
      wrote on last edited by
      #2

      ok problem solved: in the configure command line, I removed -static which was left from previous tentatives, which was conflicting with qmake.conf which was defining dynamic lib.

      So not an issue now.

      Thanks,
      Greg

      1 Reply Last reply
      0
      • P Offline
        P Offline
        post4pavan
        wrote on last edited by
        #3

        Hi Gregm, Have you ported Qt to your target?

        Qt for Embedded! INTERESTING!

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gregm
          wrote on last edited by
          #4

          yes, i did. make sure to use the qmake.conf which is posted on the imxcommunity in referece to Qt on Freescale cpu

          1 Reply Last reply
          0
          • P Offline
            P Offline
            post4pavan
            wrote on last edited by
            #5

            Yeah Yes! I have used the same qmake.conf you have referred to from the community.

            Can you please tell me

            1. if you have used an application binary? or
            2. if you have used a QML based model to port to your Target?

            Thanks & Regards :: Krishna Pavan

            Qt for Embedded! INTERESTING!

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gregm
              wrote on last edited by
              #6

              An app binary

              1 Reply Last reply
              0
              • P Offline
                P Offline
                post4pavan
                wrote on last edited by
                #7

                Thank You Gregm!

                1. Can you please tell me the way you have ported it to the target, I mean Application Binary for the instant.

                2. I would like to know, If you know / have any information QML port to target.

                Can you please tell me?

                Thanks & Regards :: Krishna Pavan

                Qt for Embedded! INTERESTING!

                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