[[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'