Important: Please read the Qt Code of Conduct -

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

  • 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 toQCoreApplication::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
    #if !defined(qdoc)
    QCoreApplication(int &argc, char **argv, int
    #if !defined(QT_BUILD_CORE_LIB)
    = ApplicationFlags

    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?


  • 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.


  • Hi Gregm, Have you ported Qt to your target?

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

  • 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

  • An app binary

  • 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

Log in to reply