The dlna library version is libdlna-0.2.4
An error occurred while executing./configure:
------------------------------
Error, can't findlibavformat!
--------------------------------------------
View the config. log file:
----------------------------------------------------------
...
/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!
------------------------------------
Run the PKG-config command to check the link of the shared library used by the avformat library cflags:
-------------------------------------------------------------
$ PKG-config libavformat -- libs
-Pthread-L/usr/local/lib-lavformat-lavcodec-lswresample-lavutil-LRT-LM
-------------------------------------------------------------
I am also new to the PKG-config command. For the usage of its principles, seeUsage of PKG-config
Modify configure (add these libraries in red ):
-------------------------------------------------------------
...
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 ..."
---------------------------------------------------------------
Then execute./configure to solve the problem.
Error message for executing 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
--------------------------------------------------------------
Solution: Undefined reference to 'av _ close_input_file 'Cause Analysis
Dlna error, can't findlibavformat! Solution