ijkplayer编译遇到的问题和解决办法

2019-04-06  本文已影响0人  紫水依

环境:Xcode 10.2,iOS11

1、执行./compile-ffmpeg.sh all时遇到

xcrun -sdk iphoneos clang is unable to create an executable file.C compiler test failed.If you think configure made a mistake, make sure you are using the latestversion from Git.Ifthe latest version fails, report the problem to theffmpeg-user@ffmpeg.org mailinglistorIRC#ffmpeg on irc.freenode.net.Includethe log file"config.log"produced by configureasthis will helpsolve the problem.

解决办法:

执行以下命令
sudo xcode-select --switch /Applications/Xcode.app
之后再次执行

cd ios
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

2、再次执行./compile-ffmpeg.sh all时遇到

./libavutil/arm/asm.S:50:9: error: unknown directive
.arch armv7-a
^
make: *** [libavcodec/arm/aacpsdsp_neon.o] Error 1
make: *** Waiting for unfinished jobs....

解决办法:

ios/complile-ffmpeg.sh 25行添加
FF_ALL_ARCHS_IOS10_SDK="arm64 i386 x86_64"
修改
FF_ALL_ARCHS=$FF_ALL_ARCHS_IOS10_SDK
Xcode 10 测试没问题

3、集成ijkplayer时运行报错

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
operator delete", referenced from:
operator new [] (unsigned long) , referenced from:

解决办法:
General-->Linked Frameworks and Libraries添加一个库
libc++.tdb

参考链接:
1、iOS集成FFmpeg及视频格式转码
2、armv7 编译问题处理咨询
3、关于集成ijkplayer的framework中的那些坑

上一篇下一篇

猜你喜欢

热点阅读