Results 1 to 3 of 3

Thread: How to build and install Qt apps on cross compiled embedded targets

  1. #1
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question How to build and install Qt apps on cross compiled embedded targets

    How should Qt application be built and installed when building for cross compiled embedded targets?

    I'm building Qt 4.7 (w/QWS) for ARM Linux, using the CodeSourcery cross compiler. I have no problems configuring and building Qt (using "./configure -prefix /opt/qt ...") and then installing on the target staging filesystem directory (with "make install INSTALL_ROOT=/targetfs"). This installs everything under /targetfs/opt/qt which is what I want.

    However, when I want to build my own Qt applications, the compiler complains because it tries to include "/opt/qt/include" which doesn't exist on host because it's a target path. How can I instruct Qt to look for "/targetfs/opt/qt/include" which is to where Qt installed the headers?

    I've experimented with -hostprefix, but it doesn't work like I hoped. With "make install INSTALL_ROOT=..." it will install everything even the host tools under this install root (*edit* using the hostprefix path inside the INSTALL_ROOT directory)

    How is this supposed to be done?

  2. #2
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to build and install Qt apps on cross compiled embedded targets

    *bump*

    Perhaps others can tell how they build and install Qt and Qt apps for embedded targets, please.

  3. #3
    Join Date
    Sep 2009
    Posts
    31
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to build and install Qt apps on cross compiled embedded targets

    Hi,
    I'm solving same problem. I just forgot to INSTALL_ROOT (unfortunatelly) and have Qt installed in path /usr/local/qt4-${ARCHITECTURE}. But I also would prefere solution with INSTALL_ROOT .. The only solution I see is to have two build of Qt, one for target and the second for host (with host specific prefix).
    If you already know the solution, please let me know.

    BR

Similar Threads

  1. Replies: 14
    Last Post: 18th January 2011, 10:13
  2. Cross compiling Qt 4 apps for linux
    By Dante in forum Qt Programming
    Replies: 9
    Last Post: 13th May 2009, 14:33
  3. Creating lint build targets
    By Micawber in forum Installation and Deployment
    Replies: 1
    Last Post: 15th April 2008, 22:44
  4. Multiple apps using Qt/Embedded+Qtopia on Embedded Linux
    By drahardja in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th February 2008, 22:46
  5. Using qmake to build multiple apps and libs
    By marchand in forum Newbie
    Replies: 2
    Last Post: 12th June 2006, 18:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.