If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
stardomains
Posts: 180
Registered: ‎12-14-2009
My Device: Not Specified

Headless App problem: "Service" and "bb::pim::account::Service"

[ Edited ]

New Edit:

 

Actually whenever I add -lbbpim to the headless .pro file I get make errors. Does anyone know why or can they reproduce this? Just add -lbbpim to the pro file of your headless service.

 

Build Log:

 

Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib -Wl,-O1 -o CascadesProjectService release/main.o release/myservice.o release/moc_myservice.o -L/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/lib -L/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib -L/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/qt4/lib -L/Applications/Momentics.app/target_10_2_0_1155/qnx6//usr/lib/qt4/lib -lbb -lbbplatform -lbbsystem -lbbpim -lbbdevice -lQtGui -lQtCore -lm -lbps
make[2]: Leaving directory `/Users/dave/Desktop/suck/CascadesProjectService/arm'
make[1]: Leaving directory `/Users/dave/Desktop/suck/CascadesProjectService/arm'
/Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/ntoarm-ld: warning: libQtSql.so.4, needed by /Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so, not found (try using -rpath or -rpath-link)
/Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/ntoarm-ld: warning: libQtXml.so.4, needed by /Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so, not found (try using -rpath or -rpath-link)
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::rollback()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomDocument::~QDomDocument()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::addDatabase(QString const&, QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::numRowsAffected() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::childNodes() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomElement::tagName() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlError::~QSqlError()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::exec(QString const&) const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::lastError() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::exec(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::smileytongue:repare(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::smileysurprised:pen()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::bindValue(int, QVariant const&, QFlags<QSql::smileytongue:aramTypeFlag>)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomElement::attributeNode(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNodeList::~QDomNodeList()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomDocument::QDomDocument(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::QSqlQuery(QSqlDatabase)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::lastInsertId() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::nodeValue() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::~QSqlDatabase()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::database(QString const&, bool)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomDocument::setContent(QByteArray const&, QString*, int*, int*)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::size() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::~QDomNode()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::finish()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::isValid() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::toElement() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::isElement() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNodeList::item(int) const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::~QSqlQuery()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::lastError() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::value(int) const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::close()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::removeDatabase(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::QSqlDatabase(QSqlDatabase const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNode::~QDomNode()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::QSqlQuery(QString const&, QSqlDatabase)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::databaseName() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::exec()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::first()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::commit()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::setDatabaseName(QString const&)'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlError::text() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlDatabase::transaction()'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomDocument::elementsByTagName(QString const&) const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomAttr::value() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QDomNodeList::length() const'
/Applications/Momentics.app/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbpim.so: undefined reference to `QSqlQuery::next()'
cc: /Applications/Momentics.app/host_10_2_0_15/darwin/x86/usr/bin/ntoarm-ld error 1
make[2]: *** [CascadesProjectService] Error 1
make[1]: *** [release] Error 2
make: *** [Device-Release] Error 2

 

------

 

Original question

 

I use:

 

#include<bb/pim/account/Service>

using namespace bb::smileytongue:im::account;

 

in my headless app. I have errors that I have pinpointed to a conflict between "bb::smileytongue:im::account::smileyfrustrated:ervice" and the class name "Service":

 

"Service::Service(bb::Application * app):

QObject(app),

m_notify(new Notification(this)),

m_invokeManager(new InvokeManager(this))

{..."

 

The error: " 'Service' does not name a type " occurs for this.

 

I tried renaming the class and app to like Serviceh but then I get Make errors.

 

Is there something I can put in front of:

 

"Service::Service(bb::Application * app):

QObject(app),

m_notify(new Notification(this)),

m_invokeManager(new InvokeManager(this))

{..."

 

that would remove the : "Service does not name a type" error?

 

 

Please use plain text.
Developer
stardomains
Posts: 180
Registered: ‎12-14-2009
My Device: Not Specified

Re: Headless App problem: "Service" and "bb::pim::account::Service"

Nevermind: looks like it had to do with a path text that was getting changed in the bar descriptor xml file for some reason.

Please use plain text.
Developer
10soft
Posts: 33
Registered: ‎12-05-2013
My Device: Z10
My Carrier: 123456789

Re: Headless App problem: "Service" and "bb::pim::account::Service"

Add this:

-lQtSql -lQtXml
Please use plain text.