Compile libRTMP with MinGW

来源:互联网 发布:cf无后坐力软件 编辑:程序博客网 时间:2024/05/22 08:23

转自:

http://go.kblog.us/2012/09/compile-librmtp-with-mingw.html

The libRTMP library provides online multimedia streaming support for many open-source projects, such as ffmpeg and curl. I am building librtmp for use with ffmpeg and mplayer. I downloaded the latest release tarball from here.

  1. First, I compiled zlib as shown in this post.

    make -f win32/Makefile.gcccp -iv zlib1.dll /mingw/bincp -iv zconf.h zlib.h /mingw/includecp -iv libz.a /mingw/libcp -iv libz.dll.a /mingw/lib
  2. Then, I built OpenSSL as shown in this post.

    ./Configure -DHAVE_STRUCT_TIMESPEC -L/mingw/lib -lz -lpthreadGC2 -lws2_32 --prefix=/mingw threads zlib mingwmakemake install
  3. Then, I built librtmp.

    make SYS=mingwcp -iv *.exe /mingw/bin

    To build the shared library, I typed:

    cd librtmpgcc -shared -o librtmp.dll -Wl,--out-implib,librtmp.dll.a rtmp.o log.o amf.o hashswf.o parseurl.o -lssl -lcrypto -lz -lws2_32 -lwinmm -lgdi32

    To install librtmp, I typed the following:

    cp -iv librtmp.dll /mingw/bincp -iv amf.h http.h log.h rtmp.h /mingw/include/librtmpcp -iv librtmp*.a /mingw/libcp -iv librtmp.pc /mingw/lib/pkgconfig
  4. Sometimes, librtmp.pc fails to be generated. In that case, make it yourself and copy it to /mingw/lib/pkgconfig.

    prefix=/mingwexec_prefix=${prefix}libdir=${exec_prefix}/libincdir=${prefix}/include/librtmpName: librtmpDescription: RTMP implementationVersion: 2.3Requires: openssl libcryptoURL: http://rtmpdump.mplayerhq.huLibs: -L${libdir} -lrtmp -lzLibs.private: -lws2_32 -lwinmm -lgdi32 -lssl -lcryptoCflags: -I${incdir}
0 0
原创粉丝点击