QGeoCoordinate:没有那个文件或目录 [英] QGeoCoordinate: No such file or directory

查看:165
本文介绍了QGeoCoordinate:没有那个文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 QtLocation,但我不能!我不明白为什么!我在 ubuntu 14.04 上使用 qt5.3.2.这很奇怪,因为我将这行添加到了我的 .pro 文件中:

I’m trying to use QtLocation but I can’t! I don’t realise why! I’m using qt5.3.2 with ubuntu 14.04. it’s strange because I added this lines to my .pro file:

QT       += network
CONFIG   += mobility
MOBILITY  += location

然后就是qmake成功了.nad 我检查了我的 qt5 库,我可以找到这个库,但我仍然无法使用它!

and it’s qmake successfully. nad I checked my qt5 libraries and I can find this library but still I can’t use it!

它无法识别我的包含并打印如下错误:

it’s not recognize my includes and print errors like this:

QGeoCoordinate: No such file or directory

并且 int 不是唯一无法识别的包含.通常它不识别 QGeo 类型!

and int’s not the only include that it’s not recognize. generally it’s not recognize QGeo types!

推荐答案

TL;DR:将此添加到您的 .pro 文件中:

TL;DR: add this to your .pro file:

QT += positioning

QGeo* 类(和 QNmeaPositionInfoSource)捆绑在它们自己的库中,需要如上引用.

The QGeo* classes (and QNmeaPositionInfoSource) are bundled in their own library, which need to be referenced as above.

除此之外,MOBILITY"和CONFIG"语句看起来像是来自 Qt4 的一些遗物,上面的行应该足够了.

Apart from that, the "MOBILITY" and "CONFIG" statements look like some relic from Qt4, the line above should be enough.

这篇关于QGeoCoordinate:没有那个文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆