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
New Contributor
Posts: 2
Registered: ‎12-08-2013
My Device: Blackberry Z10
My Carrier: Docomo
Accepted Solution

Make error adding lbbdata to .pro file.

Hello all,

 

I searched through the forums but could only find questions where the solution was adding -lbbdata.

 

Here is my issue:

I want to use the JSonDataAccess class, and must add lbbdata to my .pro file in order to use it. Right now I am essentially working with the default headless application template. When I build without -lbbdata, I get the following:

 

make -j8 Device-Debug
make -C .//translations -f Makefile update
cd arm && C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/qmake -spec blackberry-armv7le-qcc ../WaniNotifierService.pro CONFIG+=debug_and_release CONFIG+=device
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lupdate WaniNotifierService.pro
Updating 'WaniNotifierService.ts'...
    Found 0 source text(s) (0 new and 0 already existing)
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lrelease WaniNotifierService.pro
Updating 'C:/Users/Mark/momentics-workspace/WaniNotifierService/translations/WaniNotifierService.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
make -C ./arm -f Makefile debug
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
make -f Makefile.Debug
make[2]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
make[2]: Nothing to be done for `first'.
make[2]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'

 

Everything works fine. However, by just adding -lbbdata to the .pro file, and make a modification to any other file, this happens:

 

make -j8 Device-Debug
make -C .//translations -f Makefile update
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lupdate WaniNotifierService.pro
Updating 'WaniNotifierService.ts'...
    Found 0 source text(s) (0 new and 0 already existing)
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lrelease WaniNotifierService.pro
Updating 'C:/Users/Mark/momentics-workspace/WaniNotifierService/translations/WaniNotifierService.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/translations'
make -C ./arm -f Makefile debug
make[1]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
make -f Makefile.Debug
make[2]: Entering directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
qcc -Vgcc_ntoarmv7le -c -Wc,-include -Wc,debug/WaniNotifierService -Wno-psabi -lang-c++ -fstack-protector -fstack-protector-all -mcpu=cortex-a9 -g -Wall -W -D_REENTRANT -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/share/qt4/mkspecs/blackberry-armv7le-qcc -I../../WaniNotifierService -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4/QtCore -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4/QtNetwork -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4/QtGui -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4 -I../src -Idebug -I../../WaniNotifierService -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/freetype2 -I. -o debug/WaniParser.o ../src/WaniParser.cpp
../src/WaniParser.cpp:11:5: warning: unused parameter 'json' [-Wunused-parameter]
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -Wl,-rpath-link,C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -o WaniNotifierService debug/WaniKaniApi.o debug/WaniParser.o debug/main.o debug/service.o debug/moc_WaniKaniApi.o debug/moc_WaniParser.o debug/moc_service.o    -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/qt4/lib -LC:/bbndk/target_10_2_0_1155/qnx6//usr/lib/qt4/lib -lbb -lbbsystem -lbbplatform -lbbdata -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps
C:\bbndk\host_10_2_0_15\win32\x86\usr\bin\ntoarm-ld: warning: libQtDeclarative.so.4, needed by C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so, not found (try using -rpath or -rpath-link)
C:\bbndk\host_10_2_0_15\win32\x86\usr\bin\ntoarm-ld: warning: libQtSql.so.4, needed by C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so, not found (try using -rpath or -rpath-link)
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlRecord::fieldName(int) const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::rollback()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::addDatabase(QString const&, QString const&)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlRecord::~QSqlRecord()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QDeclarativePrivate::qdeclarativeelement_destructor(QObject*)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::~QSqlError()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::driverText() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::lastError() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::record() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlRecord::count() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery:: prepare(QString const&)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase:: open()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::QSqlQuery(QSqlDatabase)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::~QSqlDatabase()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase:: operator=(QSqlDatabase const&)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::type() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::finish()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::isValid() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::bindValue(QString const&, QVariant const&, QFlags<QSql:: ParamTypeFlag>)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::~QSqlQuery()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::lastError() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::value(int) const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::close()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::setForwardOnly(bool)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::QSqlDatabase(QSqlDatabase const&)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QDeclarativePrivate::qmlregister(QDeclarativePrivate::RegistrationType, void*)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::exec()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::commit()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::databaseText() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::setDatabaseName(QString const&)'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::QSqlDatabase()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::isOpen() const'
make[2]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlDatabase::transaction()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::isValid() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlError::number() const'
make[1]: Leaving directory `C:/Users/Mark/momentics-workspace/WaniNotifierService/arm'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::lastQuery() const'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::next()'
C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/libbbdata.so: undefined reference to `QSqlQuery::addBindValue(QVariant const&, QFlags<QSql:: ParamTypeFlag>)'
cc: C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/ntoarm-ld caught signal 1
make[2]: *** [WaniNotifierService] Error 1
make[1]: *** [debug] Error 2
make: *** [Device-Debug] Error 2

 

Would anybody be able to explain what is going on, and how I can fix this?

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Make error adding lbbdata to .pro file.

[ Edited ]

Hi!

Try adding to .pro file:

 

QT += sql declarative

LIBS += -lbbdata

 

libbbdata needs QT SQL libraries which weren't linked.

 

 

upd: it seems 'declarative' is also required, I've updated the QT line above.


Andrey Fidrya, @zmeyc on twitter
New Contributor
Posts: 2
Registered: ‎12-08-2013
My Device: Blackberry Z10
My Carrier: Docomo

Re: Make error adding lbbdata to .pro file.

Thanks, it works perfect! Is there a resource somewhere that tells me what I would need to link for libQtDeclarative.so.4? I didn't have any success googling.
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Make error adding lbbdata to .pro file.

[ Edited ]

Cool. Glad to hear it works. Smiley Happy

qmake-related info can be found in Qt docs. pro file is processed by qmake.

If there's libname.so
It should be passed to linker as -lname (the linker will prepend 'lib' and add '.so' automatically).

.4. etc is a version, most likely the appropriate version of lib will be symlinked to it's default name:
libQtDeclarative.so.4 -> libQtDeclarative.so etc

There are a few predefined qmake presets (declarative, db, sql etc) which can be specified in "QT" field. They will not only link the appropriate library, but will also add it's headers to include path.

It's possible to link these libs manually:
LIBS += -lQtSql
INCLUDE += …path to QtSql...
but "QT +=" is a shortcut for these standard libs.


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 28
Registered: ‎11-07-2013
My Device: 9790
My Carrier: VietNam

Re: Make error adding lbbdata to .pro file.

Hi!
Try adding to .pro file:

CONFIG += cascades10

Developer
Posts: 1,065
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Make error adding lbbdata to .pro file.

Hi AricLam, welcome to the forums. This thread was marked as solved several weeks ago. Please avoid continuation of solved threads unless you feel the accepted answer was wrong or incomplete or if you genuinely have a simpler solution. In this case the accepted solution was simple and complete.

 

Thanks.


AricLam wrote:
Hi!
Try adding to .pro file:

CONFIG += cascades10






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.