Dlna error, can't findlibavformat! Solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.