Important: Please read the Qt Code of Conduct -

QT Creator cross compiling

  • Hello I am using A13 olinuxino board and QT Creator. I try to cross compile my QT Creator files but I dont know how. I try to look from the internet but there are too many not understandable information on the internet. I'm stuck right now. Can someone help me about this. I am new to cross compiling world.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you asking how to cross-compile "from" QtCreator or how to cross-compile QtCreator ?

  • Thank you, I'm asking how to cross-compile QTCreator

  • Lifetime Qt Champion

    So you want to run QtCreator on the board to develop your Qt application ?

  • Actually I want to create and compile Qt application on my computer and then run it on board. I am sorry If my English is not understandable

  • Hi i have used QtCreator for developing application. Now that application is running on my host machine. Now i want to use QtCreator to cross compile the developed application. Is there any procedure to cross compile in QtCreator.

  • Lifetime Qt Champion

    First thing to do is cross-compile Qt, then add that new build to the known Qt Versions of Qt Creator, make a kit with it and use it

  • Cross compiling the Qt is through command prompt only?

    Assume that i have cross compiled Qt through terminal. My next question is how to add that new build to QtCreator?

  • Lifetime Qt Champion

    Yes it is.

    Qt Creator -> Preferences -> Build & Run -> Qt Versions

  • Hi SGalst,

    I have cross compiled my Qt open source 4.8.5 and build the Qmake with ./configure options......

    Now i want to give this Qmake path to the Qtcreator......through Tools->options->Qt4 and add....

    now when i add its showing some danger symbol and telling Qmake link broken.....

    i am using QtCreator 2.3.2......

    Initially i thought may be using old QtCreator.......then i added this Qmake which i made with Qt4.8.5 in the Qt creator based on the Qt 5.2 even then i am getting error saying that No compiler can compile this Qmake..

    Please help me...

  • Lifetime Qt Champion

    First thing to do is update your Qt Creator to at least 3.0.0 otherwise your won't be able to use Qt 5.2

  • Hi SGalst,

    i have changed all the versions following versions am using.

    I am using Qt source libraries from 4.8.4

    and Qt creator am using is 2.7.2 which is based on Qt4.8.4....i think there wont be any issue with this right?

    I just want to update further:

    I successfully configured the libraries with the following configurations.

    export PATH=$PATH:/home/anoop/Desktop/arm-2011.03/bin
    arm-2011.03/bin: These binaries downloaded from CodeSourcery (Mentor Graphics) site.

    ./configure -qpa -arch arm -xplatform /home/anoop/Desktop/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-gnueabi-g++ -no-largefile -no-accessibility -verbose -little-endian -no-webkit -prefix /home/anoop/Desktop/ARMBuildQt -no-qt3support

    afterwards i did make and make install.

    Now my build Qt libraries are there in ARMBuildQt folder.

    I have opened QtCreator 2.7.2 and given Qmake path for Manual Qtversion

    Now it says there is no compiler to compile, Now i have added compiler as arm-linux-gnueabi-g++

    after all this it saying configure the tool kit....i dont know what to fill in that toolkit option...

    Please help me i am really stuck at this point.

  • this is my Qmake file

    qmake configuration for building with arm-linux-g++


    modifications to g++.conf

    QMAKE_CC = /usr/local/Code_sourcery/bin/arm-none-linux-gnueabi-gcc -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_CXX = /usr/local/Code_sourcery/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_LINK = /usr/local/Code_sourcery/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt
    QMAKE_LINK_SHLIB = /usr/local/Code_sourcery/bin/arm-none-linux-gnueabi-g++ -msoft-float -D_GCC_FLOAT_NOT_NEEDED -march=armv4t -mtune=arm920t -O0 -lrt

    modifications to linux.conf

    QMAKE_AR = /usr/local/Code_sourcery/bin/arm-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY = /usr/local/Code_sourcery/bin/arm-linux-gnueabi-objcopy
    QMAKE_STRIP = /usr/local/Code_sourcery/bin/arm-linux-gnueabi-strip
    MAKE_RANLIB = /usr/local/Code_sourcery/bin/arm-none-linux-gnueabi-ranlib

    QMAKE_CFLAGS_RELEASE += -march=armv4 -mtune=arm920t
    QMAKE_CFLAGS_DEBUG += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_MT += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_SHLIB += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_THREAD += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
    QMAKE_CFLAGS_WARN_ON += -march=armv4t -mtune=arm920t

    QMAKE_CXXFLAGS_DEBUG += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_MT += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_MT_DBG += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_MT_DLL += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_MT_DLLDBG += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_RELEASE += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_SHLIB += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_THREAD += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_WARN_OFF += -march=armv4t -mtune=arm920t
    QMAKE_CXXFLAGS_WARN_ON += -march=armv4t -mtune=arm920t


  • Sorry above file is Qmake Configuration file which i have modified inside qws/mkspecs/am-linux-g++ folder

Log in to reply