首页| 论坛| 消息

标题:用ARM交叉编译器编译带QWebView的控件会出现这样的错误提示?
作者:xiang8000
日期:2011-01-14 00:56
内容:

我在工程文件中加入了QT +=webkit,然后在PC中编译顺利通过,并且执行程序显示网页正常,然后将工程用交叉编译器编译,编译途中出现这个错误提示:
怎么回事?看样子有点像环境变量没找到,但是同路径下的其他头文件都找到了的,唯独这个就找不到,怎么个情况?
main.cpp:4:22: error: qwebview.h: No such file or directory
main.cpp:19: error: ISO C++ forbids declaration of 'QWebView' with no type
main.cpp:19: error: expected ';' before '*' token
main.cpp: In constructor 'a::a()':
main.cpp:13: error: 'w' was not declared in this scope
main.cpp:13: error: expected type-specifier before 'QWebView'
main.cpp:13: error: expected `;' before 'QWebView'
main.cpp: In function 'int main(int, char**)':
main.cpp:26: error: 'class a' has no member named 'w'
make: *** 错误 1
这是我的代码:就这么一点点测试用
************main.cpp***************
#include
#include
#include
#include //即使换成 #include 也会提示一样的错误
#include
class a:public QDialog
{
public:
a()
{
l=new QGridLayout(this);
w=new QWebView;//就这里,该死的这句交叉编译出错!
w->setUrl(QUrl("http://www.baidu.com"));
}
public:
int x;
QGridLayout *l;
QWebView *w;
};
int main(int args,char *argv[])
{
QApplication app(args,argv);
a aa;
aa.l->addWidget(aa.w);
aa.show();
return app.exec();
}
************net.pro***************
QT += webkit
SOURCES += \
main.cpp
FORMS +=
HEADERS +=

*******
难道是对QT4.7的交叉编译所使用的编译参数里面没有包含对 QtWebKit,QW ..


#1 [wlzxlc 04-17 11:04]
我在做一个ARM平台的谷歌地图导航,和你一样的,你看一下QTEDIR/include中有没有QWebkit 如果没有,在配置的时候参数如下。
./configure -prefix /opt -embedded arm -release -opensource -fast -no-accessibility -no-scripttools -no-mmx -no-multimedia-no-svg -no-3dnow -no-sse -no-sse2 -silent -qt-libpng -qt-libjpeg -no-libmng -no-libtiff -no-multimedia -make libs -nomake tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform -webkitqws/linux-arm-g++ -little-endian -qt-freetype -depths 16,18 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-glib -qt-mouse-tslib -I /opt/tslib/include-L /opt/tslib/lib
#2 [shihaoliu 05-06 10:59]
Hi:
可以请教下你是怎么安装qt-embedded的吗。我用qt-everywhere-opensource-src-4.7.2安装qt-embedded,安装后怎么让例程在开发板上运行呢,是把qt-embedded目录下的东西都拷到开发板的文件系统吗?
谢谢。
#3 [zhw_mag 06-08 16:24]
-no-webkit 是因为这个吧~

回复 发表
主题 版块