DLNA它 Error, can't findlibavformat ! 解
2015-07-21 21:20
288 查看
DLNA库版本号为libdlna-0.2.4
运行./configure出错:
------------------------------
Error, can't findlibavformat !
--------------------------------------------
查看config.log文件:
----------------------------------------------------------
…
/usr/local/lib/libavformat.a(rtp.o):In function `ff_rtp_get_payload_type':
/home/won/Downloads/ffmpeg/libavformat/rtp.c:99:undefined reference to `av_opt_get_int'
/home/won/Downloads/ffmpeg/libavformat/rtp.c:109:undefined reference to `av_opt_flag_is_set'
/usr/local/lib/libavformat.a(rtp.o):In function `ff_rtp_codec_id':
/home/won/Downloads/ffmpeg/libavformat/rtp.c:148:undefined reference to `av_strcasecmp'
collect2: ldreturned 1 exit status
Error, can't findlibavformat !
------------------------------------
用pkg-config命令查下avformat库使用的共享库的链接CFLAGS:
-------------------------------------------------------------
$pkg-config libavformat --libs
-pthread-L/usr/local/lib -lavformat -lavcodec -lswresample -lavutil -lrt -lm
-------------------------------------------------------------
关于pkg-config命令我也是刚接触,关于它的原理的使用方法,能够看下pkg-config的使用方法
改动configure(加上红色部分的这些库):
-------------------------------------------------------------
…
echolog"Checking for libavformat ..."
check_liblibavformat/avformat.h av_register_all -lavformat-pthread -lavformat -lavcodec -lswresample -lavutil -lrt -lm|| die"Error, can't find
libavformat !"
echolog"Checking for libavcodec ..."
---------------------------------------------------------------
再运行./configure,问题解决。
运行make的出错信息:
--------------------------------------------------------------
…
gcc test-libdlna.c-W -Wall -Wno-unused-but-set-variable -D_LARGEFILE_SOURCE-D_FILE_OFFSET_BITS=64 -D_REENTRANT -O3 -Isrc -Lsrc -ldlna -lavformat -pthread -lavcodec -lswresample -lavutil
-lrt-lm -o test-libdlna
src/libdlna.so:undefined reference to `av_close_input_file'
src/libdlna.so:undefined reference to `av_find_stream_info'
collect2: ldreturned 1 exit status
make: ***[test-libdlna] Error 1
--------------------------------------------------------------
解决方法:undefined
reference to `av_close_input_file' 原因分析
运行./configure出错:
------------------------------
Error, can't findlibavformat !
--------------------------------------------
查看config.log文件:
----------------------------------------------------------
…
/usr/local/lib/libavformat.a(rtp.o):In function `ff_rtp_get_payload_type':
/home/won/Downloads/ffmpeg/libavformat/rtp.c:99:undefined reference to `av_opt_get_int'
/home/won/Downloads/ffmpeg/libavformat/rtp.c:109:undefined reference to `av_opt_flag_is_set'
/usr/local/lib/libavformat.a(rtp.o):In function `ff_rtp_codec_id':
/home/won/Downloads/ffmpeg/libavformat/rtp.c:148:undefined reference to `av_strcasecmp'
collect2: ldreturned 1 exit status
Error, can't findlibavformat !
------------------------------------
用pkg-config命令查下avformat库使用的共享库的链接CFLAGS:
-------------------------------------------------------------
$pkg-config libavformat --libs
-pthread-L/usr/local/lib -lavformat -lavcodec -lswresample -lavutil -lrt -lm
-------------------------------------------------------------
关于pkg-config命令我也是刚接触,关于它的原理的使用方法,能够看下pkg-config的使用方法
改动configure(加上红色部分的这些库):
-------------------------------------------------------------
…
echolog"Checking for libavformat ..."
check_liblibavformat/avformat.h av_register_all -lavformat-pthread -lavformat -lavcodec -lswresample -lavutil -lrt -lm|| die"Error, can't find
libavformat !"
echolog"Checking for libavcodec ..."
---------------------------------------------------------------
再运行./configure,问题解决。
运行make的出错信息:
--------------------------------------------------------------
…
gcc test-libdlna.c-W -Wall -Wno-unused-but-set-variable -D_LARGEFILE_SOURCE-D_FILE_OFFSET_BITS=64 -D_REENTRANT -O3 -Isrc -Lsrc -ldlna -lavformat -pthread -lavcodec -lswresample -lavutil
-lrt-lm -o test-libdlna
src/libdlna.so:undefined reference to `av_close_input_file'
src/libdlna.so:undefined reference to `av_find_stream_info'
collect2: ldreturned 1 exit status
make: ***[test-libdlna] Error 1
--------------------------------------------------------------
解决方法:undefined
reference to `av_close_input_file' 原因分析
相关文章推荐
- 栈
- OO’s Sequence
- Scala入门到精通——第五节 函数与闭包
- STA之Concepts (1)
- 开发第一个iOS项目 Hello iOS
- uva 1474(dp)
- POJ2186 USACO 2003 Fall Popular Cows(强联通分支)
- VS2010安装与环境配置
- 一天连十万字都读不到的人是没有出路的
- hdu 1061 Rightmost Digit
- storm如何保证at least once语义?
- WCM重启报数据库启动错误
- swift2 类型转换
- 建立一个长度未知的数组
- 转 TCP/IP协议族
- JavaScript 事件对象
- 二叉树的遍历
- 2015 多校赛 第一场 1002 (hdu 5289)
- HDU 5294 - Tricks Device(最短路+最小割)
- ANR完全解析