主要是在linux虚拟机操作. 文件传输使用. xftp
主要按照文章http://higoge.github.io/2015/07/17/sm02/index.html
http://higoge.github.io/2015/07/16/sm01/index.html步骤;配置环境.
环境搭建库: vlc-contrib-i686-w64-mingw32-20150630.tar.bz2。
下载速度非常慢建议复制地址ftp://ftp.videolan.org/pub/videolan/contrib/i686-w64-mingw32/vlc-contrib-i686-w64-mingw32-20150630.tar.bz2 到迅雷下载.
我的操作是简单的拷贝到/home/w/vlc-2.2.1/contrib目录下改名为
vlc-contrib-i686-w64-mingw32-latest.tar
然后运行 make prebuilt.这样可以省去下载 第三方库的时间,非常慢.
同时也运行这个命令.
- sudo apt-get build-dep vlc
发一下我编译遇到错误:和解决.
1.
cd ../i686-w64-mingw32 && ../../contrib/src/change_prefix.sh
/bin/sh: 1: ../../contrib/src/change_prefix.sh: Permission denied
make: *** [prebuilt] Error 126
cd ../i686-w64-mingw32
sudo bash ../../contrib/src/change_prefix.sh
2.
configure: error: LibVLC requires mingw-runtime version 3.15 or higher, or mingw-w64 version 3.0 or higher!
(ubuntu14.04版本没有这个错误, 12.0 会有这个错误)
3
.configure: error: Library dvdread > 4.9.0 needed for dvdread was not found
Library libgoom2 needed for goom was not found
4.
fatal error: dpapi.h: No such file or directory
/usr/share/mingw-w64/include (搜索系统文件 找到在这个目录. 从这个文件夹下拷贝到) /home/w/vlc-2.2.1/contrib/i686-w64-mingw32/include
5./home/jb/vlc-2.2/contrib/mingw/x265/source/common/param.cpp:775: undefined reference to `strtok_r'
bash ../extras/package/win32/configure.sh --host=i686-w64-mingw32 --disable-dvdread --disable-goom --disable-dvdread --disable-taglib --disable-x265 --disable-gnutls (关闭掉x265)
6.
/bin/bash: ../extras/package/win32/../../../make-alias: Permission denied
(此时只剩打包)
打包失败.
手动拷贝 /home/w/vlc-2.2.1/win32/_win32/lib/vlc/plugins到/home/w/vlc-2.2.1/win32/bin目录下.再讲bin拷贝的window,
直接运行成功.音视频正常.