天天看點

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

[email protected] /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     發現木馬:廣告插件   

繼續閱讀