嵌入式 编译win32平台的vlc错误汇总
2013-12-02 14:42
375 查看
一开始使用cygwin编译VLC2.0.0,解决完一堆的问题之后,出现"Undefine refrence to _Unwind_Sjlj_Resume_" ,看起来是mingw编译器的问题,各种方法都试过了,还是没法继续编译。于是使用另一种方法,linux环境下用交叉编译工具mingw进行编译,终于了生成可运行的VLC。这种方法需要联网获取一些新的第三方库和工具。
编译前准备,虚拟机,Ubuntu 10.04
安装交叉编译工具链
apt-get install gcc-mingw32 mingw32-binutils
安装一些必要的工具
apt-get install lua5.1
apt-get install libtool automake autoconf autopoint make gettext
apt-get install pkg-config
apt-get install git
apt-get install subversion
apt-get install cmake cvs <=用于编译第三方库,对于直接下载编译好的可以不用
apt-get install zip p7zip nsis bzip2 <=用于打包,nsis可以生成自动安装的包
获取最新的VLC源码,vlc-2.0.4
git clone git://git.videolan.org/vlc.git vlc
cd vlc
安装第三方库
mkdir -p contrib/win32
cd contrib/win32
../boostrap --host=i586-mingw32msvc
make prebuilt <=自动下载已经编译好的第三方库并安装
回去VLC目录运行bootstrap
cd ../../
./boostrap
创建一个输出目录
mkdir win32
cd win32
运行configure配置脚本,可以使用--disable-**去掉不想要的功能
../configure --host=i586-mingw32msvc
make
编译的时候出现错误
dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char'
dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration
dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
locate vlc_windows_interfaces.h
找到vlc_windows_interfaces.h
在 37 行#include
后加一行
#undef small
即可编译通过。一开始使用cygwin编译VLC2.0.0,解决完一堆的问题之后,出现"Undefine
refrence to _Unwind_Sjlj_Resume_" ,看起来是mingw编译器的问题,各种方法都试过了,还是没法继续编译。于是使用另一种方法,linux环境下用交叉编译工具mingw进行编译,终于了生成可运行的VLC。这种方法需要联网获取一些新的第三方库和工具。
编译前准备,虚拟机,Ubuntu 10.04
安装交叉编译工具链
apt-get install gcc-mingw32 mingw32-binutils
安装一些必要的工具
apt-get install lua5.1
apt-get install libtool automake autoconf autopoint make gettext
apt-get install pkg-config
apt-get install git
apt-get install subversion
apt-get install cmake cvs <=用于编译第三方库,对于直接下载编译好的可以不用
apt-get install zip p7zip nsis bzip2 <=用于打包,nsis可以生成自动安装的包
获取最新的VLC源码,vlc-2.0.4
git clone git://git.videolan.org/vlc.git vlc
cd vlc
安装第三方库
mkdir -p contrib/win32
cd contrib/win32
../boostrap --host=i586-mingw32msvc
make prebuilt <=自动下载已经编译好的第三方库并安装
回去VLC目录运行bootstrap
cd ../../
./boostrap
创建一个输出目录
mkdir win32
cd win32
运行configure配置脚本,可以使用--disable-**去掉不想要的功能
../configure --host=i586-mingw32msvc
make
编译的时候出现错误
dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char'
dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration
dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
locate vlc_windows_interfaces.h
找到vlc_windows_interfaces.h
在 37 行#include
后加一行
#undef small
即可编译通过。
1,GCC版本信息
#gcc -v
Using built-in specs.
Target: i686-linux-gnu
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
1 安装vlc依赖的库
sudo apt-get build-dep vlc
2,安装必须的工具包否则后面会出错
#apt-get install autoconf automake libtool git subversion
3,安装win32下编译工具
sudo apt-get install mingw32
#apt-get install gcc-mingw32
#apt-get install mingw32-binutils
4.安装最新的VLC
#cd /home/git_work
#git clone git://git.videolan.org/vlc.git
5.进入vlc目录,进入第三方包目录
#cd vlc
#mkdir -p contrib/win32
#cd contrib/win32
6.配置并编译第三方包
#../bootstrap --host=i586-mingw32msvc 指定交叉编译工具
Guessing build system... i686-linux-gnu
Creating configuration file... config.mak
Bootstrap completed.
Run "make" to start compilation.
Other targets:
* make install same as "make"
* make prebuilt fetch and install prebuilt binaries
* make list list packages
* make fetch fetch required source tarballs
* make fetch-all fetch all source tarballs
* make distclean clean everything and undo bootstrap
* makemostlyclean clean everything exceptsource tarballs
* make clean clean everything
* make package prepare prebuilt packages
#make prebuilt
Fixingup ./lib/libdvdread.la
Fixingup ./lib/libfreetype.la
Fixingup ./lib/libzvbi.la
Fixingup ./lib/libresid-builder.la
Fixingup ./lib/libschroedinger-1.0.la
Fixingup ./lib/libFLAC.la
Fixingup ./change_prefix.sh
7.回到vlc根目录
#cd ../..
#./bootstrap
+ rm -fpo/Makevars.template ABOUT-NLS
+ echo
+ mv -fINSTALL.git INSTALL
+ rm -f stamp-h*
+ set +x
Successfullybootstrapped
8.配置makefile
#mkdir win32 && cd win32
#../extras/package/win32/configure.sh --host=i586-mingw32msvc
checking forLUA... no
configure:WARNING: No package 'lua5.1' found, trying lua >= 5.1 instead
checking forLUA... yes
checking forluac... no
出错就安装
#apt-get install lua5.1
再
#../extras/package/win32/configure.sh --host=i586-mingw32msvc
libvlcconfiguration
--------------------
version : 2.1.0-git
system : mingw32
architecture : i586 mmx sse sse2
optimizations : yes
vlcaliases : cvlc rvlc qvlc svlc
Tobuild vlc and its plugins, type `./compile' or `make'.
9.编译
#make
10.打包
#make package-win32-zip
11.在vlc/win32目录下可以找到vlc-2.1.0-git-win32.zip文件,复制到windows目录下,解压缩即可运行
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
sudo
apt-get install binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
[html] view
plaincopy
sudo apt-get install gcc-mingw-w64 g++-mingw-w64
下载
ftp://ftp.jp.debian.org/debian/pool/main/m/mingw-w64
- You must use mingw-w64 3.0 or later (Please note that the binary size is about 7M)
- http://packages.debian.org/experimental
... 4-i686-dev
改一下名字,不然装不了
mv mingw-w64-i686-dev_3.0~svn5408-1_all.deb mingw-w64-i686-dev_3.deb
sudo
dpkg -i mingw-w64-i686-dev_3.deb
[html] view
plaincopy
sudo dpkg -i mingw-w64-i686-dev_3.0~svn5408-1_all.deb
sudo
apt-get install ua5.1 libtool automake autoconf autopoint make gettext pkg-config git subversion cmake cvs zip p7zip-full nsis bzip2
[html] view
plaincopy
sudo apt-get install ua5.1 libtool automake autoconf autopoint make gettext pkg-config git subversion cmake cvs zip p7zip-full nsis bzip2
git
clone git://git.videolan.org/vlc.git vlc
[html] view
plaincopy
git clone git://git.videolan.org/vlc.git vlc
cd
vlc
mkdir -p contrib/win32
cd contrib/win32
../bootstrap --host=i686-w64-mingw32
make prebuilt
[html] view
plaincopy
cd vlc
mkdir -p contrib/win32
cd contrib/win32
../bootstrap --host=i686-w64-mingw32
make prebuilt
会把依赖的 第三方库下载下来.
[html] view
plaincopy
cd contrib/win32
make .qt4
回到vlc目录下
[html] view
plaincopy
cd
-
./bootstrap
[html] view
plaincopy
cd -
./bootstrap
[html] view
plaincopy
mkdir
win32 && cd win32
../configure --host=i686-w64-mingw32
[html] view
plaincopy
mkdir win32 && cd win32
../configure --host=i686-w64-mingw32
这里你能加上自己的配置
[html] view
plaincopy
../configure
--help
[html] view
plaincopy
../configure --help
出现下面打印,配置成功
libvlc configuration
--------------------
version : 2.1.0-git
system : mingw32
architecture : i686 mmx sse sse2
optimizations : yes
vlc aliases : cvlc rvlc qvlc svlc
To build vlc and its plugins, type `make', or `./compile' if you like nice colors.
plaincopy
make
[html] view
plaincopy
make
开始编绎,漫长等待.
ok
打包
[html] view
plaincopy
make
package-win32-zip
[html] view
plaincopy
make package-win32-zip
![](http://img.my.csdn.net/uploads/201301/31/1359623333_1020.jpg)
安装之后 完美运行
![](http://img.my.csdn.net/uploads/201301/31/1359623497_2003.jpg)
vlc官方文档用的 i586-mingw32msvc
这里要换成 i686-w64-mingw32
http://wiki.videolan.org/Win32Compile#Obtaining_the_toolchain
编译前准备,虚拟机,Ubuntu 10.04
安装交叉编译工具链
apt-get install gcc-mingw32 mingw32-binutils
安装一些必要的工具
apt-get install lua5.1
apt-get install libtool automake autoconf autopoint make gettext
apt-get install pkg-config
apt-get install git
apt-get install subversion
apt-get install cmake cvs <=用于编译第三方库,对于直接下载编译好的可以不用
apt-get install zip p7zip nsis bzip2 <=用于打包,nsis可以生成自动安装的包
获取最新的VLC源码,vlc-2.0.4
git clone git://git.videolan.org/vlc.git vlc
cd vlc
安装第三方库
mkdir -p contrib/win32
cd contrib/win32
../boostrap --host=i586-mingw32msvc
make prebuilt <=自动下载已经编译好的第三方库并安装
回去VLC目录运行bootstrap
cd ../../
./boostrap
创建一个输出目录
mkdir win32
cd win32
运行configure配置脚本,可以使用--disable-**去掉不想要的功能
../configure --host=i586-mingw32msvc
make
编译的时候出现错误
dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char'
dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration
dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
locate vlc_windows_interfaces.h
找到vlc_windows_interfaces.h
在 37 行#include
后加一行
#undef small
即可编译通过。一开始使用cygwin编译VLC2.0.0,解决完一堆的问题之后,出现"Undefine
refrence to _Unwind_Sjlj_Resume_" ,看起来是mingw编译器的问题,各种方法都试过了,还是没法继续编译。于是使用另一种方法,linux环境下用交叉编译工具mingw进行编译,终于了生成可运行的VLC。这种方法需要联网获取一些新的第三方库和工具。
编译前准备,虚拟机,Ubuntu 10.04
安装交叉编译工具链
apt-get install gcc-mingw32 mingw32-binutils
安装一些必要的工具
apt-get install lua5.1
apt-get install libtool automake autoconf autopoint make gettext
apt-get install pkg-config
apt-get install git
apt-get install subversion
apt-get install cmake cvs <=用于编译第三方库,对于直接下载编译好的可以不用
apt-get install zip p7zip nsis bzip2 <=用于打包,nsis可以生成自动安装的包
获取最新的VLC源码,vlc-2.0.4
git clone git://git.videolan.org/vlc.git vlc
cd vlc
安装第三方库
mkdir -p contrib/win32
cd contrib/win32
../boostrap --host=i586-mingw32msvc
make prebuilt <=自动下载已经编译好的第三方库并安装
回去VLC目录运行bootstrap
cd ../../
./boostrap
创建一个输出目录
mkdir win32
cd win32
运行configure配置脚本,可以使用--disable-**去掉不想要的功能
../configure --host=i586-mingw32msvc
make
编译的时候出现错误
dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char'
dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration
dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
locate vlc_windows_interfaces.h
找到vlc_windows_interfaces.h
在 37 行#include
后加一行
#undef small
即可编译通过。
1,GCC版本信息
#gcc -v
Using built-in specs.
Target: i686-linux-gnu
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
1 安装vlc依赖的库
sudo apt-get build-dep vlc
2,安装必须的工具包否则后面会出错
#apt-get install autoconf automake libtool git subversion
3,安装win32下编译工具
sudo apt-get install mingw32
#apt-get install gcc-mingw32
#apt-get install mingw32-binutils
4.安装最新的VLC
#cd /home/git_work
#git clone git://git.videolan.org/vlc.git
5.进入vlc目录,进入第三方包目录
#cd vlc
#mkdir -p contrib/win32
#cd contrib/win32
6.配置并编译第三方包
#../bootstrap --host=i586-mingw32msvc 指定交叉编译工具
Guessing build system... i686-linux-gnu
Creating configuration file... config.mak
Bootstrap completed.
Run "make" to start compilation.
Other targets:
* make install same as "make"
* make prebuilt fetch and install prebuilt binaries
* make list list packages
* make fetch fetch required source tarballs
* make fetch-all fetch all source tarballs
* make distclean clean everything and undo bootstrap
* makemostlyclean clean everything exceptsource tarballs
* make clean clean everything
* make package prepare prebuilt packages
#make prebuilt
Fixingup ./lib/libdvdread.la
Fixingup ./lib/libfreetype.la
Fixingup ./lib/libzvbi.la
Fixingup ./lib/libresid-builder.la
Fixingup ./lib/libschroedinger-1.0.la
Fixingup ./lib/libFLAC.la
Fixingup ./change_prefix.sh
7.回到vlc根目录
#cd ../..
#./bootstrap
+ rm -fpo/Makevars.template ABOUT-NLS
+ echo
+ mv -fINSTALL.git INSTALL
+ rm -f stamp-h*
+ set +x
Successfullybootstrapped
8.配置makefile
#mkdir win32 && cd win32
#../extras/package/win32/configure.sh --host=i586-mingw32msvc
checking forLUA... no
configure:WARNING: No package 'lua5.1' found, trying lua >= 5.1 instead
checking forLUA... yes
checking forluac... no
出错就安装
#apt-get install lua5.1
再
#../extras/package/win32/configure.sh --host=i586-mingw32msvc
libvlcconfiguration
--------------------
version : 2.1.0-git
system : mingw32
architecture : i586 mmx sse sse2
optimizations : yes
vlcaliases : cvlc rvlc qvlc svlc
Tobuild vlc and its plugins, type `./compile' or `make'.
9.编译
#make
10.打包
#make package-win32-zip
11.在vlc/win32目录下可以找到vlc-2.1.0-git-win32.zip文件,复制到windows目录下,解压缩即可运行
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
环境 Ubuntu12.04
1. 安装编绎器
sudoapt-get install binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
[html] view
plaincopy
sudo apt-get install gcc-mingw-w64 g++-mingw-w64
下载
ftp://ftp.jp.debian.org/debian/pool/main/m/mingw-w64
- You must use mingw-w64 3.0 or later (Please note that the binary size is about 7M)
- http://packages.debian.org/experimental
... 4-i686-dev
改一下名字,不然装不了
mv mingw-w64-i686-dev_3.0~svn5408-1_all.deb mingw-w64-i686-dev_3.deb
sudo
dpkg -i mingw-w64-i686-dev_3.deb
[html] view
plaincopy
sudo dpkg -i mingw-w64-i686-dev_3.0~svn5408-1_all.deb
2.安装相关工具
sudoapt-get install ua5.1 libtool automake autoconf autopoint make gettext pkg-config git subversion cmake cvs zip p7zip-full nsis bzip2
[html] view
plaincopy
sudo apt-get install ua5.1 libtool automake autoconf autopoint make gettext pkg-config git subversion cmake cvs zip p7zip-full nsis bzip2
3.下源码
gitclone git://git.videolan.org/vlc.git vlc
[html] view
plaincopy
git clone git://git.videolan.org/vlc.git vlc
4.准备第三方库
cdvlc
mkdir -p contrib/win32
cd contrib/win32
../bootstrap --host=i686-w64-mingw32
make prebuilt
[html] view
plaincopy
cd vlc
mkdir -p contrib/win32
cd contrib/win32
../bootstrap --host=i686-w64-mingw32
make prebuilt
会把依赖的 第三方库下载下来.
[html] view
plaincopy
cd contrib/win32
make .qt4
5.Bootstrap
回到vlc目录下[html] view
plaincopy
cd
-
./bootstrap
[html] view
plaincopy
cd -
./bootstrap
6.Configure
[html] viewplaincopy
mkdir
win32 && cd win32
../configure --host=i686-w64-mingw32
[html] view
plaincopy
mkdir win32 && cd win32
../configure --host=i686-w64-mingw32
这里你能加上自己的配置
[html] view
plaincopy
../configure
--help
[html] view
plaincopy
../configure --help
出现下面打印,配置成功
libvlc configuration
--------------------
version : 2.1.0-git
system : mingw32
architecture : i686 mmx sse sse2
optimizations : yes
vlc aliases : cvlc rvlc qvlc svlc
To build vlc and its plugins, type `make', or `./compile' if you like nice colors.
7.开编
[html] viewplaincopy
make
[html] view
plaincopy
make
开始编绎,漫长等待.
ok
打包
[html] view
plaincopy
make
package-win32-zip
[html] view
plaincopy
make package-win32-zip
![](http://img.my.csdn.net/uploads/201301/31/1359623333_1020.jpg)
安装之后 完美运行
![](http://img.my.csdn.net/uploads/201301/31/1359623497_2003.jpg)
8.总结
qt的版本太旧,编译时会有问题。所以需要从新下载编译qt。
vlc官方文档用的 i586-mingw32msvc这里要换成 i686-w64-mingw32
http://wiki.videolan.org/Win32Compile#Obtaining_the_toolchain
相关文章推荐
- 嵌入式 Ubuntu12.04下进行交叉编译vlc_win32
- 高通平台编译常见错误(持续更新)
- vs2015编译 libusb_win32错误统计
- 遇到的编译错误汇总
- gcc 编译c++常见错误汇总
- windows平台下vlc编译之十:vlc-1.0.0的编译
- x64 平台开发 Mapxtreme 编译错误
- Fedora 17下交叉编译vlc-2.0.6-win32小记
- windows平台下vlc编译之三:vlc-0.9.4的编译
- windows平台下vlc编译之二:vlc-0.8.6i的编译(转自jeremiah的博客)
- vs2010建立win32 application 编译错误(用vc6.0建立此工程正常运行)解决方法
- ASP.NET编译执行常见错误及解决方法汇总之二
- 嵌入式QT5.5.1在freescale IMX6Q平台的编译安装
- [转]在 WIN32 平台下完整编译 ZeroC ICE 3.3.1
- 【转】 VS2008在64位Windows平台上编译ArcEngine导致HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)错误的解决办法
- linux 内核编译实战——内核编译错误汇总
- VS下编译和发布的一些错误汇总
- windows平台下vlc编译之一:编译环境构建(2008.12.03更新)
- gcc 编译c++常见错误汇总