第1年9月19日 ios librtmp

一.

1.下载

https://github.com/minsikzzang/librtmp-iOS

 

2.编译openssl

1)build-libssl.sh修改一下为https

 

curl -O https://www.openssl.org/source/openssl-${VERSION}.tar.gz

 

2)

编译安装openssl报错:POD document had syntax errors at /usr/bin/pod2man line 69.

解决:

修改build-libssl.sh

VERSION="1.0.2e" #
SDKVERSION="14.5"

 

3.编译librtmp

1)报错hashswf.c:248:27: error: use of undeclared identifier 'INT_MAX'

解决:

修改hashswf.c

#define INT_MAX 4096

 

修改build-librtmp.sh

# rm -rf "${SRCPATH}/rtmpdump"

# git clone ${LIBRTMPREPO} src/rtmpdump

 

2)报错

ld: building for macOS, but linking in object file built for iOS Simulator, file 'rtmp.o' for architecture i386

解决:

修改rtmpdump/librtmp/Makefile

all: librtmp.a
#$(SO_LIB)

 

install: install_base
#$(SO_INST)

 

install_base: librtmp.a librtmp.pc
-mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig $(MANDIR)/man3
cp amf.h http.h log.h rtmp.h $(INCDIR)
cp librtmp.a $(LIBDIR)
# cp librtmp.pc $(LIBDIR)/pkgconfig
# cp librtmp.3 $(MANDIR)/man3

 

posted @ 2021-09-19 09:46  lianhuaren  阅读(119)  评论(0编辑  收藏  举报