Search code examples
qtubunturaspberry-pibeagleboneblackbeagleboard

QT Creator, compiling and deploying a c or c++ to a remote device (BeagleBone or R pi)


I'm trying since days to write and develop programs on my host pc (Ubuntu 64bit) using qt-creator for my beaglebone and raspberry pi devices. I looked for 'qt-creator cross compile beagle, raspberry etc...' and it leads me to hundred of links and tutorial on how to compile qt-creator for my target plattform. But seriously, that not my idea. All what I want is to simply use my pc for developing my programs and lately deploy them to the remote device.

So first of all a noob question: Is something wrong with my idea? Should I really compile the source of qt for beaglebone or raspberry on my pc for writing programs which lately should be run on that devices????

I will not compile qt-creator again for another plattform, so I don't know how to find the right way. A lot of informations on internet are misleading.

So after many hours spend look for the right information I come up with the following procedure:

first I installed a arm-gnu toolchain on my 64bit Ubuntu.

sudo apt-get install build-essential libc6-armhf-cross libc6-dev-armhf-cross binutils-arm-linux-gnueabihf linux-libc-dev-armhf-cross libstdc++6-armhf-cross gcc-4.8-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf

then I installed qt-creator from the repository on my Ubuntu:

sudo apt-get install qtcreator

I tried to configure to use qt for compiling my projects using the toolchain for arm (see following pictures)

enter image description here

and here:

enter image description here

but it seems that qt-creator doesn't recognize the new kit when I start a new project:

enter image description here

Now: I m really confused, I could think that the problem is related to qt, but I m not sure, whether the way of thinking, that I can compile on ubuntu 64bit and then run my application on the remote device is right or not.

For this reason it would be nice if you can answer the question above.

UPDATE: What happen if I add a QT-Version in my Kit???

It happens that the gnueabi compiler conflicts with that options and the following problem arises:

enter image description here

I would like to say again that I don't need to use qt-library or something like that on my remote device. I need just to use the qt-IDE as IDE for my projects (mainly c or c++ plain projects)


Solution

  • You need a complete toolchain

    A toolchain is just a name for a group of things:

    • Compiler for the target platform (or cross compiler in your case)
    • Sysroot: An image of the filesystem in the target platform
    • A cross compiling qmake
    • QtCreator and the kit

    You are lacking a cross compiling qmake. Please see my answer at this other post.

    Furthermore, you need a toolchain for the Pi, and another toolchain for the Beagle.