qmobilityglobal.h:没有这样的文件或目录

时间:2013-04-21 18:27:15

标签: c++ qt compiler-errors qt-mobility

我正在尝试编译QtMobility的一个样本 - hapticsplayer,但我甚至无法编译它,因为编译器无法找到Qt Mobility的头文件。

由于这是Qt SDK附带的样本之一,我假设有关项目配置/来源/等的所有内容。是正确的。所以我必须在我的Qt安装中缺少Qt Mobility ,或类似的东西。

以下是维护Qt SDK的软件包管理器的屏幕截图:

enter image description here

这里我粘贴了编译器错误:

In file included from ..\hapticsplayer\hapticsplayer.cpp:41:
..\hapticsplayer\/hapticsplayer.h:41:29: error: qmobilityglobal.h: No such file or directory
..\hapticsplayer\/hapticsplayer.h:45:31: error: qfeedbackactuator.h: No such file or directory
..\hapticsplayer\/hapticsplayer.h:46:29: error: qfeedbackeffect.h: No such file or directory
In file included from ..\hapticsplayer\hapticsplayer.cpp:41:
..\hapticsplayer\/hapticsplayer.h:53: error: expected constructor, destructor, or type conversion before 'class'

1 个答案:

答案 0 :(得分:0)

我发现了问题 - 这是因为我选择了构建目标。

我一直在为Symbian Anna建设,但当我切换到构建Symbian S60(这是我实际上想要构建的目标)时,该项目已成功编译。创建新项目时默认选择了Symbian Anna,这就是我为它而不是为S60构建的原因。