在添加了multimediawidgets模块后,编译报错

/usr/bin/ld: cannot find -lpulse-mainloop-glib
/usr/bin/ld: cannot find -lpulse

 

需要安装开发包libpulse-dev

sudo apt-get install libpulse-dev

 

还有一种方式是删除对这些lib的引用,修改 QT lib目录下的 Qt5MultimediaWidgets.prl文件, 删除 末尾的    -lpulse-mainloop-glib -lpulse -lglib-2.0

QMAKE_PRO_INPUT = multimediawidgets.pro
QMAKE_PRL_TARGET = libQt5MultimediaWidgets.so.5.9.7
QMAKE_PRL_CONFIG = lex yacc depend_includepath testcase_targets import_plugins import_qpa_plugin qt_build_extra file_copies qmake_use qt warn_on release link_prl incremental shared release linux unix posix gcc sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags f16c largefile precompile_header prefix_build force_independent utf8_source create_prl link_prl prepare_docs qt_docs_targets no_private_qt_headers_warning QTDIR_build qt_example_installs exceptions_off testcase_exceptions explicitlib relative_qt_rpath git_build qmake_cache target_qt c++11 strict_c++ c++14 c++1z hide_symbols bsymbolic_functions qt_install_headers need_fwd_pri qt_install_module create_cmake compiler_supports_fpmath create_pc create_libtool have_target dll thread uic opengl moc resources uic opengl moc resources
QMAKE_PRL_VERSION = 5.9.7
QMAKE_PRL_LIBS = -L$$[QT_INSTALL_LIBS] -lQt5Multimedia -L/home/mike/Qt5.9.7/5.9.7/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -lpthread