How can I compile a QT app for mini6410?

Tuxerito
Hi all.

I have a mini6410 with Debian Squeeze on it.

My host it's Kubuntu 10.10 with QT libreries installed from repository.
I have the Toolchain ready to compile.

I am trying to compile a simple app
-------------------------------------------
#include <QApplication>
#include <QPushButton>

int main(int argc, char* argv[]) {
  QApplication app(argc, argv);
  QPushButton Saludar("Hola mundo..");
  Saludar.show();
  return app.exec();
}
-------------------------------------------
In my PC, I compile it using:
qmake -project
qmake
make

Now I wish to compile it for my board but I don't know how do it.


If I change the CC and GXX in the Mekefile to arm-none-linux-gnueabi-gcc
and arm-none-linux-gnueabi-g++ whe I execute make, I got a error
--------------------------------------------------------------------------------
--------------------
arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/qws/linux-arm-gnueabi-g++/ -I.
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
-I. -o Hello.o Hello.cpp
In file included from /usr/include/qt4/QtCore/qobject.h:48:0,
                 from /usr/include/qt4/QtCore/qcoreapplication.h:45,
                 from /usr/include/qt4/QtGui/qapplication.h:45,
                 from /usr/include/qt4/QtGui/QApplication:1,
                 from Hello.cpp:1:
/usr/include/qt4/QtCore/qatomic_i386.h: In destructor
'QString::~QString()':
/usr/include/qt4/QtCore/qatomic_i386.h:132:29: error: impossible constraint
in 'asm'
make: *** [Hello.o] Error 1
--------------------------------------------------------------------------------
--------------------

Can anyone explain me how I can compile it?


Thanks :)

davef
Which tutorial did you follow?

http://www.sereno-labs.com/qt-4-6-2-installation-procedure-for-friendlya...

Tuxerito
Thanks davef. I saw your link before I post my question because appears
red(link visited) xD

But I don't understand, I need especial libraries to make QT apps? the
libraries from repository dosen't work?

All tutorials that I saw, talk about compile QT libraries first, that was
the reason to omit it all.

Thanks :)

davef
You have cross-compile all the Qt libraries that you want and place them on
your target. I never got to that stage, but I have some libraries that were
already cross-compiled for a project I am using.

The reason I asked, which tutorial you are using, is because there are
quite a few changes in a <mkspec?> and some other files that I don't see in
your first post.

Have you have followed the linked tutorial without exception AND get the
above errors?

Tuxerito
I omited to compile QT libraries because I have installed Debian on my
board and I supose that if I install QT libraries from repository(on the
board), I don't need to compile QT libraries using cross-compile because
that libraries are for ARM.

I was thinking that to compile a QT app was only changing de compiler like
when I compiled the Kernel xD

Tomorrow I will try ALL in the link and I will post the progress.

I am new in this and somethings are confusing.


The error appears because I edit the Makefile and I changed de parameter
INCPATH to point to /usr/share/qt4/mkspecs/qws/linux-arm-gnueabi-g++/.  I
had changed CC/CXX parameters to.

Thanks for your help.

Sorry for bad english.

davef
I would check that those libraries are compiled for a ARM processor.

<readelf -A filename> 

Are you try to compile on the target, ie native compilation?  Perhaps the
mini6410 is BIG enough to do this.  From previous discussions this was
impossible or difficult to do on the mini2440.

You have exceeded my understanding here!

Daniel
Hi Tuxerito,

sorry if this is not concerning your thread in particular, but as I read,
you have Debian Squeeze on your mini6410 board. Did you manage to get the
touchscreen working with Debian? I thought that this would be possible as
you're willing to use some kind of GUI (Qt). For the case that I'm wrong,
I'm sorry for the offpic, otherwise I'd be happy if you'd share how you
accomplished it. I'd add this to my tutorial on google code
(http://code.google.com/p/mini6410-debian/), so please feel free to contact
me.

Greetings,
Daniel

Tuxerito
Hi davef.

Those libraries are compiled for ARM, it is a port from x86 libraries to
ARM/ARMEL system.

I installed QT libraries, and compilers on my mini6410 from Debian's
repository and I created the file with the sample code and I compiled like
I do on my PC and I can run the binary.

But it is some slowly to compile xD.

@Daniel

The touchscreen doesn't work, if I touch the screen, I can saw a event
message in ADW or any other serial port app,  but the mouse doesn't move.
So the module it's loaded but there is any app using it.


When I found how to solve it, I will post it, or if you found it then write
to me xD



Again sorry for my bad English :)

davef
http://groups.google.com/group/mini2440/browse_thread/thread/79ecfa19c3d...

might help?

Tuxerito
Hi davef

The USB mouse works to me, I am usign it for all my test. The problem it's
with the touchscreen :)

davef
> but the mouse doesn't move

So, the mouse works but when you try to drag the cursor around the screen
with the stylus that doesn't work?

When you and/or Eduardo solve this issue be sure to post the result.