1

I want to get the imei number In bb 10 cascades.In that path, I need to to add

  using namespace bb::data;   
  #include <bb/device/HardwareInfo> 

I have Also Included

     LIBS += -lbbpim
     LIBS += -lbbsystem
     LIBS += -lbbdevice
     LIBS += -lbbdata

files to my project.pro file !!! but I am getting Error message like...

- expected namespace-name before ';' token

- 'data' is not a namespace-name

I want to know why i am getting this error ,how to resolve that Error and I would be hapy if post any code snippet how to get device Unique Id or IEMI Number in BB 10 Cascades !!!

Sharath
  • 315
  • 1
  • 3
  • 13
  • and also 'hardwareInfo' was not declared in this scope error: expected type-specifier before 'HardwareInfo' error: expected ';' before 'HardwareInfo' – Sharath Sep 09 '13 at 07:20

1 Answers1

3

Try remove your

using namespace bb::data;

and then try

QString deviceImei = bb::device::HardwareInfo().imei();
iamanyone
  • 429
  • 2
  • 10
  • 1
    The real problem here is that you're trying to use your namespace (the ``using namespace`` line) before it's even declared (it's declared in the header you're including). Your code would have worked simply by swapping those two lines. However, ``using namespace`` is considered as a bad practice and should be avoided, @iamanyone's solution is better. – Marc Plano-Lesay Sep 09 '13 at 22:28