Libmt. So: Undefined reference to 'av _ find_stream_info @ libavformat_53'

Source: Internet
Author: User

[[email protected] instance]# makegcc -O3 -g -I/usr/include/ -I/usr/include/glib-2.0 -I/usr/include/glib-2.0/glib -I/usr/include/glib-2.0/gobject -I/usr/lib/glib-2.0/include -I../../../common -I../../../protocol -I../../../cache -I../../../capture -I../../../accessor -I../../../analyse -I../../../log -I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -DVER_WCDMA  -c main.c -o obj/main.o -DCAP_RSS -DRUN_NOMgcc -O3 -g -o ../../../../bin/msaVqosAnalyzer obj/main.o -lpthread -lrt -g -lm ../../../../lib/librsscap.a -L ../../../../lib  -lLog -lxml2  -lCommon -lAccessor -lCache  -lProtocol -lCapture -lSimulateCapture -lglib-2.0 -lgthread-2.0 -lAnalyse -lmt -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto/usr/bin/ld: warning: libavformat.so.53, needed by ../../../../lib/libmt.so, not found (try using -rpath or -rpath-link)../../../../lib/libmt.so: undefined reference to `[email protected]_53‘../../../../lib/libmt.so: undefined reference to `[email protected]_53‘../../../../lib/libmt.so: undefined reference to `get_content‘collect2: ld returned 1 exit statusmake: *** [../../../../bin/msaVqosAnalyzer] Error 1[[email protected] instance]# 

The above error occurs during makefile compilation. The specified symbol cannot be found.

 

Solution: 1. libavformat. so.53 is not found during compilation. 2. The symbol is not defined.

 

Libmt. So depends on libavformat. so.53, which includes decoding and calling. The parsing module in libmt. So has an error in connection during the overall compilation of the project.

Lib: =.../../lib/librsscap. A-L.../../lib-LMT

-LMT is added during GCC compilation to connect libmt. so, theoretically .. /.. /.. /.. /lib-L specifies the path to find libavformat. so.53 library, but it does not exist, while libmt. so has been found.

Lib: =.../../lib/librsscap. A-L.../../lib-LMT-lavfromat

 

2. undefined reference to 'get _ content'. This error is not caused by one.

NM ../lib/libmt. So | grep get_content

U is displayed, undefined. Query the source code. get_content defines the static function in the defined place, but it is called externally. Remove static OK.

 

Note: When sourceinsight adds a file, remember to re-Synchronize the project to rename the file. Otherwise, when lookup references occurs, the existing call is not displayed, and the actual call exists. The above two errors are indirectly caused.

 

Libmt. So: Undefined reference to '[email protected] _ 53'

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.