zoukankan      html  css  js  c++  java
  • Qt from Linux to Windows target

    45down voteaccepted

    Just use M cross environment (MXE). It takes the pain out of the whole process:

    • Get it:

      $ git clone https://github.com/mxe/mxe.git
    • Install build dependencies

    • Build Qt for Windows, its dependencies, and the cross-build tools; this will take about an hour on a fast machine with decent internet access; the download is about 500MB:

      $ cd mxe && make qt
    • Go to the directory of your app and add the cross-build tools to the PATH environment variable:

      $ export PATH=<mxe root>/usr/bin:$PATH
    • Run the Qt Makefile generator tool then build:

      $ <mxe root>/usr/i686-pc-mingw32/qt/bin/qmake && make
    • You should find the binary in the ./release directory:

      $ wine release/foo.exe

    Some notes:

    • Use the master branch of the MXE repository; it appears to get a lot more love from the development team.

    • The output is a 32-bit static binary, which will work well on 64-bit Windows.

    http://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target

  • 相关阅读:
    二级域名配置
    环信框架-消息模块
    屏幕适配问题
    iOS-NSSession
    环信框架使用
    静态UITableView
    __weak存在的问题
    MVVM与MVC
    iOS通知与多线程
    block
  • 原文地址:https://www.cnblogs.com/findumars/p/6251009.html
Copyright © 2011-2022 走看看