首页 > Windows开发 > 详细

Qt from Linux to Windows target

时间:2017-01-05 07:59:11      阅读:297      评论:0      收藏:0      [点我收藏+]

 

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

 

Qt from Linux to Windows target

原文:http://www.cnblogs.com/findumars/p/6251009.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!