Forums

Questions about QT(-embedded)

Started by Marco Trapanese January 1, 2009
Hello to all,

I'm sorry if my English is not so good.
I want to develop applications for embedded boards (such as Beagle 
Board) using the QT libraries in C++.

Also I need to use QT for desktop applications.

As far as I know, I need the QT-embedded for the first case.
I use Eclipse IDE with the QT plugin. I run them either under Windows XP 
or under Ubuntu.

I have also the toolchain for the embedded board (CodeSourcery for OMAP) 
and I can successfully compile C++ code.

The problems rise when I try to include the QT libraries in my projects. 
The QT plugin for Eclipse hides standard build parameters so I can't 
change the compiler invoked.

Would you give me a hint?

I can't find tutorials that cover this subject.
By the way, I found the official QT forum a bit 'dead'... is this a good 
place where ask questions about QT-embedded?

Thanks,
Marco

Marco Trapanese wrote:

> The problems rise when I try to include the QT libraries in my projects. > The QT plugin for Eclipse hides standard build parameters so I can't > change the compiler invoked.
I don't know if this is the right way, but at least it works: First I have substituted all gcc, g++ etc. occurences in mkspecs/qws/linux-arm-g++/qmake.conf with the name of my crosscompiler programs. Then I've configured it like this (this was for a version with a commercial licence file) : echo yes | ./configure -qt-kbd-tty -embedded arm -shared -release \ -nomake demos -nomake examples \ -no-svg -no-phonon -no-webkit -no-qt3support \ -qt-libpng -qt-zlib Then a "make" uses the cross compiler and the "make install" installs it somewhere in /usr, with "arm" in the path (I don't remember the exact path). -- Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
Frank Buss ha scritto:

> I don't know if this is the right way, but at least it works: First I have > substituted all gcc, g++ etc. occurences in > mkspecs/qws/linux-arm-g++/qmake.conf with the name of my crosscompiler > programs.
Ok, just a question. My crosscompiler executable is arm-none-linux-gnueabi-gcc (and g++). Let's consider these lines: QMAKE_AR = arm-linux-ar cqs QMAKE_OBJCOPY = arm-linux-objcopy QMAKE_RANLIB = arm-linux-ranlib should I change them in: QMAKE_AR = arm-none-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy QMAKE_RANLIB = arm-none-linux-gnueabi-ranlib
> Then I've configured it like this (this was for a version with a > commercial licence file) :
[cut]
> Then a "make" uses the cross compiler
The ./configure command works fine, but during make it screams it doesn't find arm-linux-gcc, I guess it is due to the other qmake.conf files into other mkspecs/qws subfolders. How did you manage that? Thanks again Marco
Marco Trapanese wrote:

> Ok, just a question. My crosscompiler executable is > arm-none-linux-gnueabi-gcc (and g++). > Let's consider these lines: > > QMAKE_AR = arm-linux-ar cqs > QMAKE_OBJCOPY = arm-linux-objcopy > QMAKE_RANLIB = arm-linux-ranlib > > should I change them in: > > QMAKE_AR = arm-none-linux-gnueabi-ar cqs > QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy > QMAKE_RANLIB = arm-none-linux-gnueabi-ranlib
Yes, if you have these programs.
> The ./configure command works fine, but during make it screams it > doesn't find arm-linux-gcc, I guess it is due to the other qmake.conf > files into other mkspecs/qws subfolders. > > How did you manage that?
I added the cross compiler directory (was only one), where I have the cross compiler programs, to /etc/profile to the global path (should work after re-login or restart X11). -- Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
Marco Trapanese ha scritto:

> The ./configure command works fine, but during make it screams it > doesn't find arm-linux-gcc, I guess it is due to the other qmake.conf > files into other mkspecs/qws subfolders.
I was wrong. Now is compiling... zzz.... zzz... Marco
Frank Buss ha scritto:

> I added the cross compiler directory (was only one), where I have the cross > compiler programs, to /etc/profile to the global path (should work after > re-login or restart X11).
Ok, now I'm running into this error during 'make': /usr/src/qt-embedded-linux-opensource-src-4.4.3/lib/libQtCore.so: undefined reference to `clock_gettime' collect2: ld returned 1 exit status make[2]: *** [deform] Error 1 make[2]: Leaving directory `/usr/src/qt-embedded-linux-opensource-src-4.4.3/demos/deform' make[1]: *** [sub-deform-make_default] Error 2 make[1]: Leaving directory `/usr/src/qt-embedded-linux-opensource-src-4.4.3/demos' make: *** [sub-demos-make_default-ordered] Error 2 I'm a beginner in this world,.. and I apologize if I ask you again how to fix that. I can't figure out how to solve a compile error like this. Marco
Marco Trapanese wrote:

> /usr/src/qt-embedded-linux-opensource-src-4.4.3/lib/libQtCore.so: > undefined reference to `clock_gettime' > collect2: ld returned 1 exit status > make[2]: *** [deform] Error 1 > make[2]: Leaving directory > `/usr/src/qt-embedded-linux-opensource-src-4.4.3/demos/deform' > make[1]: *** [sub-deform-make_default] Error 2 > make[1]: Leaving directory > `/usr/src/qt-embedded-linux-opensource-src-4.4.3/demos' > make: *** [sub-demos-make_default-ordered] Error 2
This looks like a problem with the standard library. There are cross compiler environments with the GNU libc and other environments with newlib and maybe even other libraries. I've used the cross compiler from the http://www.angstrom-distribution.org project, which works fine for Qt 4.4. -- Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
Frank Buss ha scritto:

> This looks like a problem with the standard library. There are cross > compiler environments with the GNU libc and other environments with newlib > and maybe even other libraries. I've used the cross compiler from the > http://www.angstrom-distribution.org project, which works fine for Qt 4.4.
It was enough run make distclean. Now I successfully compiled QT and I also configured Eclipse for compile QT project. Thanks a lot Marco