Hi, I need to cross-compile a Qt project for ARM processors.

I'm using QtCreator and I want to manage the build process from this IDE. I've already cross-compiled gcc, g++ and Qt-Embedded-4.5.0 for ARM.

Now I want to build my project. These are the steps I've already done:

1) Add a new build settings entry (Debug - ARM).
2) Select Qt-Embedded-4.5.0-arm as Qt library version.
3) Add Qt-Embedded-4.5.0-arm and gcc/g++-arm bin paths to my PATH environment variable.
4) Specify a custom command line for QMake:

Qt Code:
  1. -spec /usr/local/Trolltech/QtEmbedded-4.5.0-arm/mkspecs/qws/linux-armv6-g++
To copy to clipboard, switch view to plain text mode 

5) Select "Clean project", "Run qmake" and "Build project" options from project context menu.

This is my command line for g++:

Qt Code:
  1. arm-linux-g++ -c -pipe -march=armv6 -g -Wall -W -D_REENTRANT -fPIC -DQT_PLUGIN -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
  2. -I/usr/local/Trolltech/QtEmbedded-4.5.0-arm/mkspecs/qws/linux-armv6-g++
  3. -I.
  4. -I/usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore
  5. -I/usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtNetwork
  6. -I/usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtDBus
  7. -I/usr/local/Trolltech/QtEmbedded-4.5.0-arm/include
  8. -I../../core/pkserver
  9. -I.
  10. -I.
  11. -o pkpowermanager.o pkpowermanager.cpp
To copy to clipboard, switch view to plain text mode 

..but the result is:

Qt Code:
  1. In file included from /usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore/qstring.h:46,
  2. from /usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore/qobject.h:48,
  3. from /usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore/qplugin.h:45,
  4. from /usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore/QtPlugin:1,
  5. from ../../core/pkserver/pkapplication.h:17,
  6. from pkpowermanager.h:17,
  7. from pkpowermanager.cpp:14:
  8. /usr/local/Trolltech/QtEmbedded-4.5.0-arm/include/QtCore/qbytearray.h:48:20: error: string.h: No file or directory
To copy to clipboard, switch view to plain text mode