• 6968阅读
  • 6回复

webbrowser程序编译错误,求助 [复制链接]

上一主题 下一主题
离线affe
 
只看楼主 倒序阅读 楼主  发表于: 2008-10-25
— 本帖被 XChinux 执行加亮操作(2008-11-02) —
我从新编译QT demo下的那个web browser程序可是出错了!

In file included from bookmarks.cpp:9:
history.h:18:32: QWebHistoryInterface: No such file or directory
In file included from bookmarks.cpp:9:
history.h:47: error: expected class-name before '{' token
history.h:47: warning: `class HistoryManager' has virtual functions but non-virt
ual destructor
make[1]: *** [debug/bookmarks.o] Error 1
make[1]: Leaving directory `F:/c++/prog/b'
make: *** [debug] Error 2

我把源文件中前面的大段注释删掉了,所以行数会和原文不一样。

--history.h 中的相关代码 ---------
...
#include <QWebHistoryInterface>    //18行
...

class HistoryManager : public QWebHistoryInterface  //47行
{
    Q_OBJECT
    Q_PROPERTY(int historyLimit READ historyLimit WRITE setHistoryLimit)
离线htyoung

只看该作者 1楼 发表于: 2008-10-25
仔细看看是不是漏了分号什么的,
如果你只是删了注释 不会有问题的,
最简单拿比较工具比一下原始文件,看看你是不是删了不该删的.
***
QT5
***
离线affe
只看该作者 2楼 发表于: 2008-10-26
直接编译demo的原版也是那样报错

In file included from bookmarks.cpp:42:
history.h:51:32: QWebHistoryInterface: No such file or directory
In file included from bookmarks.cpp:42:
history.h:79: error: expected class-name before '{' token
history.h:79: warning: `class HistoryManager' has virtual functions but non-virt
ual destructor
离线affe
只看该作者 3楼 发表于: 2008-10-26
大家能编译通过吗?
离线htyoung

只看该作者 4楼 发表于: 2008-10-27
Qt4.4.2 + VC express 2008 无问题。

你的错误是找不到 “QWebHistoryInterface.h” 文件,正常这个文件是在 %QTDIR%\include\QtWebKit,看一看有没有。
如果有的话,
检查一下 %QTDIR%\examples\webkit\
下的那些例子可否编译。
如果可以,那么你的环境就没问题。

最后实在没办法,把你的demo再去下一个看看。
***
QT5
***
离线water_wf

只看该作者 5楼 发表于: 2008-10-28
webkit 默认是不编译的
离线affe
只看该作者 6楼 发表于: 2008-11-11
./wtf/unicode/icu/UnicodeIcu.h:1:39: JavaScriptCore/UnicodeIcu.h: No such file or directory

这个文件好奇怪啊                ./wtf/unicode/icu/UnicodeIcu.h
追查到最后找不到这个文件  JavaScriptCore/UnicodeIcu.h
谁有给我贴一下
快速回复
限100 字节
 
上一个 下一个