QT Creator Cross compilation

To my knowledge, there are two ways to set up cross compilation.

1. Download qt-source. Build it for your board
2. Use the narcissus sdk. It already contains a build

I tried 1. Built. Qt-creator accepts the make file. Builds
application. Application crashes as soon as it is run.
Gnome display corrupts into a wierd green. And i see a mouse in the
middle of the screen. Refreshing different parts of the screen
restores it. Kinda like windows :s

Now I'm trying 2. I have the sdk of my image. Downloaded from
narcissus. QT runs on beagleboard just fine. I can run the examples.
Extracted the toolchain into usr/local/angstrom...

Now. I'm unable to set up QT-creator to use that toolchain.

When I give it a path. Some main error comes up.
ui_mainwindow error
make error.

I tried running environment-setup. Something didn't run. So i ran each
line separately.
Then went to qt-creator -> tools -> options-> qt-4-qtversions -> Add a
qmake location.
/usr/local/angstrom/arm/bin/qmake2

I tried qmake as well.

Error output in QT-Creator.

make: Entering directory '/home/zubair/hello'
mainwindow.ui -o ui_mainwindow.h
*red* make: mainwindow.ui:Command not found
make: Leaving directory '/home/zubair/hello'
*red* make:***[ui_mainwindow.h] Error 127
*red* Exited with code 2.
*red* Error while building project hello
*red* When executing build step 'Make'
Exited with code 2
Error while building

The same project works with the normal qt-toolchain. And the one I
built as well.
The one i built from sources however creates an application that
crashes. :s

What am i doing wrong?

you can write and debug your application at x86 machine and then cross compile it for ARM. I always do so

2011/3/14 ZubairLK <zubair.lutfullah@gmail.com>

How do i cross compile a QT based application for ARM?

Don't i need to use QT creator's qmake?

To my knowledge, there are two ways to set up cross compilation.

1. Download qt-source. Build it for your board
2. Use the narcissus sdk. It already contains a build

I tried 1. Built. Qt-creator accepts the make file. Builds
application. Application crashes as soon as it is run.
Gnome display corrupts into a wierd green. And i see a mouse in the
middle of the screen. Refreshing different parts of the screen
restores it. Kinda like windows :s

This sounds like you have built Qt embedded to use QWS (Qt's built in window manager).
If you have Gnome on your ARM target, then you need to build Qt for X11.
Check out your configure options.

I used trey weavers blog post as a guideline.

./configure -opensource -confirm-license -prefix /opt/qt-arm -no-
qt3support -embedded arm -little-endian -xplatform qws/linux-DM3730-g+
+ -qtlibinfix E

What should I change in it?

And do you know a way to get the sdk from narcissus to work directly.
That would be much more simpler.

Why don't you just use the prebuilt qt/e and qt/x11 from angstrom instead of rebuilding it yourself?

I want to use the prebuilt qt/e and qt/x11.

How?

I went to qt-creator -> tools -> options-> qt-4-qtversions -> Add a
qmake location.
/usr/local/angstrom/arm/bin/qmake2

I tried qmake as well.

Error output in QT-Creator.

make: Entering directory '/home/zubair/hello'
mainwindow.ui -o ui_mainwindow.h
*red* make: mainwindow.ui:Command not found
make: Leaving directory '/home/zubair/hello'
*red* make:***[ui_mainwindow.h] Error 127
*red* Exited with code 2.
*red* Error while building project hello
*red* When executing build step 'Make'
Exited with code 2
Error while building

From: "ZubairLK" <zubair.lutfullah@gmail.com>

I used trey weavers blog post as a guideline.

./configure -opensource -confirm-license -prefix /opt/qt-arm -no-
qt3support -embedded arm -little-endian -xplatform qws/linux-DM3730-g+
+ -qtlibinfix E

What should I change in it?

This is what you have wrong "-xplatform qws/linux-DM3730-g++"
QWS is a windowing system for targets that do not have X Windows,X11,X-Free, whatever you want to call it!
As your system has Gnome, you do not want a QWS build.

And do you know a way to get the sdk from narcissus to work directly.
That would be much more simpler.

I don't use it, so I can't help there!