pkg-config --exists librtmp||echo no 显示 no 说明pkg-config 没有找到相应的 librtmp.pc
问题是librtmp自动生成的/MinGW/lib/pkgconfig/librtmp.pc 文件格式有问题
原文是
prefix=/mingw
exec_prefix=${prefix}
libdir=/mingw/lib
incdir=${prefix}/include
Name: librtmp
Description: RTMP implementation
Version: v2.4
Requires: libssl,libcrypto
URL: http://rtmpdump.mplayerhq.hu
Libs: -L${libdir} -L@OPENSSLLIB@ -lrtmp -lz -lssl -lcrypto
Libs.private: -lws2_32 -lwinmm -lgdi32
Cflags: -I${incdir} -I@OPENSSLINC@
修改成
prefix=/mingw
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: librtmp
Description: RTMP implementation
URL: http://rtmpdump.mplayerhq.hu
Version: v2.4
Requires.private:
Libs: -L${libdir} -L@OPENSSLLIB@ -lrtmp
Libs.private: -lws2_32 -lwinmm -lgdi32 -lm
Cflags: -I${includedir}
修改之后
pkg-config --exists librtmp||echo no 就不显示 no