Important: Please read the Qt Code of Conduct -

Cannot mix incompatible qt library arm

  • I'm developing an application for linux embedded with processor arm (cortex a8).
    I'm using QtCreator.
    I compile with this parameter
    opt/toolchain/arm-2009q3/bin/arm-none-linux-gnueabi-g++ -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/QtEmbedded-4.7.4-arm/mkspecs/qws/linux-am35-g++ -I../qt2 -I/usr/local/Trolltech/QtEmbedded-4.7.4-arm/include/QtCore -I/usr/local/Trolltech/QtEmbedded-4.7.4-arm/include/QtNetwork -I/usr/local/Trolltech/QtEmbedded-4.7.4-arm/include/QtGui -I/usr/local/Trolltech/QtEmbedded-4.7.4-arm/include -I. -I. -I../qt2 -I. -o main.o ../qt2/main.cpp
    I'm using 4.7.4 version.
    I compile qt for embedded arm (4.7.4)
    I copy on my board .so library (4.7.4) and the application.
    When I start the application (./myApplication -qws) it is shown the following error:
    cannot mix incompatible qt library version 0x40704 with this library version 0x40701
    My problem is: where find it a reference to library version 4.7.1?


  • Check the installation on your arm board.

    You likely have a system installation of qt that is 4.7.1 - i.e. /usr/lib/ is 4.7.1.

    You have compiled against the 4.7.4 headers, but at runtime the dynamic loader is loading the system installed 4.7.1 libraries; hence it doesn't work.

    Copy all of /usr/local/Trolltech/QtEmbedded-4.7.4-arm onto your embedded board - make sure that the path is the same on the embedded board (e.g. /usr/local/TrollTech/QtEmbedded-4.7.4-arm), then set LD_LIBRARY_PATH to /usr/local/TrollTech/QtEmbedded-4.7.4-arm/lib:

    export Ld_LIBRARY_PATH=/usr/local/TrollTech/QtEmbedded-4.7.4-arm/lib

    then try running your program.

    good luck.


  • On my board I don't find
    I have the following lib in /usr/lib/qt4:
    and all are compiled for 4.7.4 (are link to libQtxyz.4.7.4)

    Other suggestions?
    When I start my application with -qws parameter, another Qt application starts?

  • Do you have ldd on the board?

    If so, run ldd <name of your binary>

    That will tell you exactly which files the dynamic linker will use to resolve symbols.

    Did you copy /usr/lib/qt4 onto the board? If not, it is most likely 4.7.1, and hence QtCore is version 4.7.1, and is compiled against the headers for 4.7.1 (as expected), and thus is your problem.

    Try my suggestion about copying the entire Qt installation from your PC onto the target (or just the libs directory). Alternatively, switch to Qt 4.7.1 on your PC.


Log in to reply