无法将QtWebWidgets添加到项目中

时间:2014-09-02 18:33:13

标签: c++ qt

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

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"

任何想法导致这些错误的原因是什么?

1 个答案:

答案 0 :(得分:1)

在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