无法将QtWebWidgets添加到

无法将QtWebWidgets添加到

如标题所示,我无法将QtWebWidgets添加到任何QT项目中。我正在运行基于在Linux Mint 17中运行的Qt 5.3.1的QT Creator 3.2.0。

QT += webkitwidgets

到我的.pro文件时,我遇到很多错误,这表明编译器找不到文件,这是编译器的输出:
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lgstapp-0.10
/usr/bin/ld: cannot find -lgstinterfaces-0.10
/usr/bin/ld: cannot find -lgstpbutils-0.10
/usr/bin/ld: cannot find -lgstvideo-0.10
/usr/bin/ld: cannot find -lgstbase-0.10
/usr/bin/ld: cannot find -lgstreamer-0.10
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
make: *** [web_browser] Error 1
21:24:24: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project web_browser (kit: Desktop Qt 5.2.1 GCC 64bit)
When executing step "Make"

有什么想法导致这些错误吗?

最佳答案

在Ubuntu(或类似版本)中安装

安装g++

sudo apt-get install build-essential

安装OpenGL库
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev -y

执行此操作后:
sudo apt-get install libgstreamer1.0-dev
sudo apt-get install libgstreamer0.10-dev
sudo apt-get install libgstreamer-plugins-base1.0-dev
sudo apt-get install libgstreamer-plugins-base0.10-dev


sudo apt-get install qtbase5-dev

其他发行版(例如Debian)

安装QT后,在终端中使用susudo执行此命令

第一次更新(使用su或sudo):
apt-get update

安装软件包(使用su或sudo)后:
apt-get install libxslt
apt-get install libxml2
apt-get install libgio2.0
apt-get install libgstapp0.10
apt-get install libgstinterfaces0.10
apt-get install libgstpbutils0.10
apt-get install libgstvideo0.10
apt-get install libgstbase0.10
apt-get install libgstreamer0.10
apt-get install libgobject2.0
apt-get install libgmodule2.0
apt-get install libgthread2.0
apt-get install libglib2.0
apt-get install libgl

关于c++ - 无法将QtWebWidgets添加到项目,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25630001/

10-09 04:59