windows下编译vlc库

1、下载安装windows的GNU,MinGW,;


2、下载vlc源码包,解压;


3、安装ffmpeg;

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/local/lib/

需要avcodec编解码库的支持。


4、准备工作

[1]、安装LUA tools:

下载安装包,http://www.lua.org/ftp;

编译:make mingw

cp src/*.dll /local/bin

cp src/*.exe /local/bin

[2]、安装pkg-config

下载以下文件包,解压到C:\Msys\1.0相应文件夹里。

  http://ftp.gnome.org/pub/GNOME/binaries/win32/glib

  ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip

  ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip

  http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip

直接将glib、pkg-config、gettext等dll和exe文件拷贝到/local/bin下面。


5、预编译;

打开msys.bat,文件最开头前面注意加上:

call "C:\MinGW\bin"(这里有很多工具可能用到)

 ./extras/package/win32/configure.sh  --disable-lua --disable-mad --enable-shared


(1)configure: error: C compiler cannot create executables

编译之前设置了LDFLAGS,将这个变量清空就可以了。

export LDFLAGS=


(2)checking for AVCODEC... no
configure: error: . Pass --disable-avcodec to ignore this error.

export PKG_CONFIG_PATH="/local/lib/pkgconfig:"


(3)checking for LIVE555... no
configure: WARNING: .
checking for live555 version 1324598400 or later... no
configure: WARNING: live555 is missing or its installed version is too old:
Version 2011.12.23 or later is required to proceed.
You can get an updated one from http://www.live555.com/liveMedia .
configure: error: Update live555 or pass --disable-live555 to disable RTSP input
 support.

http://www.live555.com/liveMedia/public/ 下载live555源码包

./genMakefiles mingw
make
make install

 (4)m4/with_pkg.m4:34: PKG_WITH_MODULES is expanded from...

m4/with_pkg.m4:83: PKG_ENABLE_MODULES_VLC is expanded from...
configure.ac:4033: the top level
configure.ac:1: error: possibly undefined macro: dnl
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:38: error: possibly undefined macro: AS_IF
configure.ac:57: error: possibly undefined macro: AC_DEFINE
configure.ac:181: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:296: error: possibly undefined macro: AC_PREPROC_IFELSE
configure.ac:296: error: possibly undefined macro: AC_LANG_PROGRAM
configure.ac:441: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:451: error: possibly undefined macro: AC_CACHE_CHECK
configure.ac:719: error: possibly undefined macro: AC_CHECK_HEADERS
configure.ac:813: error: possibly undefined macro: AC_MSG_WARN
configure.ac:839: error: possibly undefined macro: AC_LANG_PUSH
configure.ac:841: error: possibly undefined macro: AC_LANG_POP
configure.ac:1942: error: possibly undefined macro: AC_CHECK_HEADER
configure.ac:2284: error: possibly undefined macro: AC_MSG_NOTICE
configure:25997: error: possibly undefined macro: m4_n
autoreconf-2.68: /mingw/bin/autoconf-2.68 failed with exit status: 1


[5]configure.ac:4033: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun
'd
m4/with_pkg.m4:34: PKG_WITH_MODULES is expanded from...
m4/with_pkg.m4:83: PKG_ENABLE_MODULES_VLC is expanded from...
configure.ac:4033: the top level
configure.ac:1: error: possibly undefined macro: dnl
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.


[6]编译gettext        gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I./../intl   -g -O2 -c test-lock.c
test-lock.c: In function 'gl_thread_self':
test-lock.c:109:3: error: cannot convert to a pointer type
make[3]: *** [test-lock.o] Error 1
make[3]: Leaving directory `/e/BRT-Project/vlc/vlc-windows/extras/gettext-0.18.1
.1/gettext-0.18.1.1/gettext-runtime/tests'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/e/BRT-Project/vlc/vlc-windows/extras/gettext-0.18.1
.1/gettext-0.18.1.1/gettext-runtime'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/e/BRT-Project/vlc/vlc-windows/extras/gettext-0.18.1
.1/gettext-0.18.1.1/gettext-runtime'
make: *** [all-recursive] Error 1


[7]编译libiconv

e -DHAVE_CONFIG_H -c ./relocatable.c  -DDLL_EXPORT -DPIC -o .libs/relocatable.o
./relocatable.c:278:1: error: unknown type name 'BOOL'
./relocatable.c:279:1: error: expected '=', ',', ';', 'asm' or '__attribute__'
efore 'DllMain'
make[2]: *** [relocatable.lo] Error 1
make[2]: Leaving directory `/e/BRT-Project/vlc/vlc-windows/extras/libiconv-1.9.
/libiconv-1.9.1/libcharset/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/e/BRT-Project/vlc/vlc-windows/extras/libiconv-1.9.
/libiconv-1.9.1/libcharset'
make: *** [lib/localcharset.h] Error 2
Administrator@brtir-7be8d1e5b /e/BRT-Project/vlc/vlc-windows/extras/libiconv-1.
.1/libiconv-1.9.1


./configure CC=g++


[8]

checking for sys/mount.h... no
checking for ssize_t... yes
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
./extras/package/win32/../../../configure: line 23718: syntax error near unexpec
ted token `MINIZIP,'
./extras/package/win32/../../../configure: line 23718: `  PKG_CHECK_MODULES(MINI
ZIP, minizip ,  have_minizip=yes ,'


5、配置时注意360杀毒的影响,最好先关闭。

 vlc-2.1.5-codes\vlc-2.1.5\conftest.exe
2014-07-30 11:39:35     发现木马:广告插件   


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
编译VLC Windows版本需要一些步骤和工具。首先,我们需要下载Windows版本的VLC源代码,可以从官方网站或GitHub上获取最新的源代码。接下来,我们需要安装一些编译工具,如CMake(一个用于生成构建脚本的工具)、MinGW(一个类似于MSVC的编译器工具链)和Git(用于版本控制和代码下载)。 一旦我们将源代码下载到本地,我们可以使用CMake来配置编译过程。打开CMake GUI并将源代码目录设置为源码文件的路径。然后,将构建目录设置为我们想要生成编译文件的路径。点击"Configure"按钮来生成配置文件。在这个过程中,我们可以选择一些编译选项,如编译类型(Debug或Release)和目标平台(32位或64位)。一旦配置成功,我们可以点击"Generate"按钮生成构建脚本。 然后我们打开构建脚本所在目录,并在命令行中执行编译命令。具体命令包括运行"mingw32-make"来执行编译过程,并使用"-j"参数加上CPU核心数量来加速编译。这个过程可能需要一段时间,具体取决于计算机性能和源代码大小。 一旦编译过程结束,我们可以在构建目录中找到生成的VLC可执行文件和相关依赖项。我们可以将这些文件复制到其他位置,以便在Windows系统上使用。 需要注意的是,编译VLC可能会因为各种原因出现错误或问题。这些问题可能涉及环境配置、依赖项安装或源代码本身。对于初学者来说,可能需要花费一些时间来解决这些问题。因此,熟悉编译和调试的用户可能会更加容易。 总结起来,编译VLC Windows版本需要下载源代码,安装编译工具(如CMake、MinGW和Git),使用CMake配置编译过程,执行编译命令,并注意解决潜在的错误和问题。这些步骤可以为我们提供在Windows系统上编译和使用VLC的能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值