1. 源码:。
库: 。 Linux:2. 安装库
$ sudo apt-get install -y gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools$ sudo apt-get install -y lua5.2 libtool automake autoconf autopoint make gettext$ sudo apt-get install -y qt4-dev-tools qt5-default$ sudo apt-get install -y git subversion cmake cvs wine-dev yasm$ sudo apt-get install -y zip p7zip nsis bzip2
3. 执行脚本
#!/bin/sh# This script enforces statically linking of libgcc, libstdc++-6, and libpthread,# without needing to rebuild gcc and mingw-w64 from scratch.# -static-libgcc -static-libstdc++ flags can not be used in a libtool build system,# as libtool removes flags that it doesn't understand.move() { [ -f $1 ] || return 1 mkdir -p old/ mv -v $* old/ return 0}for x in i686 x86_64do library_path_list=`$x-w64-mingw32-gcc -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2|sort|uniq` IFS=':' for i in $library_path_list do cd $i move libstdc++-6.dll libstdc++.dll.a libgcc_s.a libgcc_s_sjlj-1.dll && ln -s libgcc_eh.a libgcc_s.a move libpthread.dll.a libwinpthread.dll.a move libwinpthread-1.dll [ -d ../bin ] && cd ../bin && move libwinpthread-1.dll donedoneexit 0
4. 编译源码
../extras/package/win32/configure.sh --host=i686-w64-mingw32 --disable-lua --disable-dvdread --disable-goom --disable-dvdread --disable-taglib --disable-x265 --disable-gnutls --disable-mkv
其他的和windows下编译基本一样。
https://higoge.github.io/2015/07/17/sm02/index.html