JustMe
JustMe

Reputation: 732

Error: 'QGeoCoordinate' does not name a type

I am C++ and BB10 begainer developer, I have a small problem while compiling that 'QGeoCoordinate' does not name a type in both hpp and cpp this is my hpp

#ifndef GLOBALOBJECTS_HPP_
#define GLOBALOBJECTS_HPP_
#include <QtLocationSubset/QGeoCoordinate>

namespace bb { namespace cascades { class Application; }}

extern QGeoCoordinate currentCoordinates;
extern double someVar;

#endif

and this is my cpp

#include "GlobalObjects.hpp"
#include <QtLocationSubset/QGeoCoordinate>

namespace bb { namespace cascades { class Application; }}
QGeoCoordinate currentCoordinates;
double  someVar;


Notes
1- someVar works good but the problem in the currentCoordinates object
2- I added lQtLocationSubset lib on my .pro file

Upvotes: 0

Views: 436

Answers (1)

Richard
Richard

Reputation: 8920

If you use Eclipse to drill down into the include file QtLocationSubset/QGeoCoordinate you will find the macro QTMS_BEGIN_NAMESPACE which expands to:

namespace QtMobilitySubset {

So you need to refere to the class with a fully qualified name:

QtMobilitySubset::QGeoCoordinate

or specify the namespace:

using namespace QtMobilitySubset;

Upvotes: 1

Related Questions