Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1115105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:06:28+00:00 2026-05-17T03:06:28+00:00

I have been trying to get Qt X11 cross compiled for PowerPC for a

  • 0

I have been trying to get Qt X11 cross compiled for PowerPC for a while now and kept having various problems.

From the information given my Qt support, all one needs to do is:

  1. Create a new mkspec
  2. Copy an existing directory in mkspec/ I used linux-g++ and modified it.
  3. Modify qmake.conf to use your toolchain, libraries and includes
  4. Run the following configure command:

    ./configure -arch <your arch> -xplatform <your mkspec> -prefix <where you want Qt installed> <other options>

  5. After configure is done, run make then make install. You’ll find Qt installed in the directory you specified in the -prefix option.

Had all kinds of problems doing this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T03:06:29+00:00Added an answer on May 17, 2026 at 3:06 am

    My solution:

    1. Copy mkspecs/linux-g++ to mkspecs/linux-g++-<my arch>
    2. Modify mkspecs/linux-g++/qmake.conf as in the example below. Read the comments in the example file for specifics
    3. I did not have to modify qplatformdefs.h, though you might for your architecture
    4. Running the configure script with the options in the question worked along with make and make install
    5. Now you can compile your code against your cross-compiled Qt X11. moc, uic, etc. have been compiled for your host, so they will generate code accordingly.
    6. To run your software with your cross-compiled Qt libs, just copy /libs from where you install Qt to your targets lib folder or you can put it into some other folder and set your LD_LIBRARY_PATH to include the Qt lib folder.

    Example qmake.conf:

    #
    # qmake configuration for linux-g++-ppc_74xx
    #
    
    MAKEFILE_GENERATOR = UNIX
    TEMPLATE           = app
    CONFIG             += qt warn_on release incremental link_prl
    QT                 += core gui
    QMAKE_INCREMENTAL_STYLE = sublib
    
    include(../common/g++.conf)
    include(../common/linux.conf)
    
    #
    # Modifications to g++.conf
    #
    # my_arch-g++ is the full executable path of your g++, make sure your PATH
    # contains the directory for your toolchain
    #
    QMAKE_CC         = my_arch-g++
    QMAKE_CXX        = my_arch-g++
    QMAKE_LINK       = my_arch-g++
    QMAKE_LINK_SHLIB = my_arch-g++
    
    #
    # I had to provide includes and libraries for packages my toolchain does not
    # provide this is mostly X11 and glib stuff.  You'll either have to
    # cross-compile it yourself or get it from your distribution
    #
    QMAKE_CFLAGS     = -I/path/to/your/includes \
                       -L/path/to/your/libs
    QMAKE_CXXFLAGS   = $$QMAKE_CFLAGS
    
    #
    # Modifications to linux.conf
    #
    # Same as g++ stuff above
    #
    QMAKE_AR          = my_arch-ar cqs
    QMAKE_OBJCOPY     = my_arch-objcopy
    QMAKE_STRIP       = my_arch-strip
    
    #
    # I had all kinds of problems linking Qt source with X11 depending on how I
    # specified the include paths.  My toolchain provided most X11 functionality
    # and I just had to add missing parts in the CXXFLAGS and CFLAGS,
    # but specifying exactly where to find X11 includes and libraries specific
    # to my toolchain fixed some of the issues I experienced
    #
    QMAKE_INCDIR_X11  = /path/to/your/toolchain/includes
    QMAKE_LIBDIR_X11  = /path/to/your/toolchain/libs
    
    load(qt_config)
    

    UPDATE:

    This solution will work for “stand-alone” compilation. If you need to build Qt X11 for Angstrom, OpenEmbedded, Android, OpenWRT, etc. you’ll have to use their respective build systems for proper compilation. For example, for OpenEmbedded targets (i.e. Angstrom), you’ll have to write a BitBake recipe.

    This problem occurred due to a need for supporting legacy systems. Using Embedded Qt was not an option. For new projects, I would strongly recommend the use of Embedded Qt.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having some problems trying to get my PHP running. When I
I have been trying to get around this error for a day now and
I have been trying to get the latest version of phpmailer from here: http://sourceforge.net/projects/phpmailer/files/
I have been trying to get this program to work but so far having
For a few days now I have been trying to get an ASMX webservice
I have been trying for quite a while now to resize the desktop work
I have been trying to get more in to TDD. Currently keeping it simple
I have been trying for a long time to get SQL Server Express on
Have been trying to get integration testing working with my seam project and the
I have been trying to get a progressbar set to marquee to keep moving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.