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
Visitor
Posts: 1
Registered: ‎11-13-2012
My Device: Blackberry 10 Dev A
My Carrier: Telkomsel

libbbmsp undefined reference to Q...

[ Edited ]

Hi guys, I'm currently experimenting (well, learning) the BBM social platform library for BB10 native development.

I'm trying to implement the example from http://developer.blackberry.com/native/beta/reference/com.qnx.doc.bbmsp.lib_ref/topic/overview.html

 

But I run into some problem, the first one is undefined reference to bbmsp functions which then I solved by adding bbmsp library to the linker.

 

But after that, there comes another build error that is the libbbmsp.so has an undefined reference to some Q... objects, here's a glimpse of the log


 

**** Build of configuration Device-Release for project BBMTest ****

**** Internal Builder is used for build ****
qcc -o BBMTest src\main.o -lbbmsp -lbps -V4.6.3,gcc_ntoarmv7le_cpp -w1 -lang-c++ -Wl,-z,relro -Wl,-z,now -pie -LD:/bb10sdk/target_10_0_9_386/qnx6/../target-override/armle-v7/lib -LD:/bb10sdk/target_10_0_9_386/qnx6/../target-override/armle-v7/usr/lib
D:/bb10sdk/target_10_0_9_386/qnx6/armle-v7/usr/lib/libbbmsp.so: undefined reference to `QCryptographicHash::hash(QByteArray const&, QCryptographicHash::Algorithm)'
D:/bb10sdk/target_10_0_9_386/qnx6/armle-v7/usr/lib/libbbmsp.so: undefined reference to `QListData::remove(int)'

.... .... 

... .... (much more things on Q objects)

cc: D:/bb10sdk/host_10_0_9_52/win32/x86/usr/bin/ntoarm-ld caught signal 1

Build error occurred, build is stopped


 

Now I'm kinda lost on what to do, it will be great if someone can help me on this issue.

Thanks a bunch :Angel:

 

EDIT: As a side note, I'm currently developing a bb10 game with cocos2d-x and planning to add some bbm features onto the game :smileyhappy:

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: libbbmsp undefined reference to Q...

[ Edited ]

Not sure what to day but probably you'd like to compile one of these BBM examples: https://github.com/blackberry/Core-Native-Community-Samples and see whether you have the same problem.

Trusted Contributor
Posts: 195
Registered: ‎03-12-2012
My Device: PlayBook
My Carrier: None

Re: libbbmsp undefined reference to Q...

I have the same problem.

 

Is bbmsp Qt only?  What if I am developing in C but want to use BBM?

Sucroid.com
Sweet Apps for the Fans
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: libbbmsp undefined reference to Q...

It requires only QtCore library, so no GUI elements. My project for example has nothing to do with Qt at all but I have to link with QtCore just to be able to use BBM integration.

Trusted Contributor
Posts: 195
Registered: ‎03-12-2012
My Device: PlayBook
My Carrier: None

Re: libbbmsp undefined reference to Q...

I added the library QtCore and it complained:

 

/Applications/bbndk/host_10_0_9_284/darwin/x86/usr/bin/ntoarm-ld: cannot find -lQtCore

Sucroid.com
Sweet Apps for the Fans
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: libbbmsp undefined reference to Q...

Add this

${QNX_TARGET}/${CPUVARDIR}/usr/lib/qt4/lib

to Library Paths (-L) section in your Project's settings (or to Makefile).

Trusted Contributor
Posts: 195
Registered: ‎03-12-2012
My Device: PlayBook
My Carrier: None

Re: libbbmsp undefined reference to Q...

Thanks a bunch. No more complaints! But when I launch the app, I get

ldd:FATAL: Could not load library libQtCore.so.4
Sucroid.com
Sweet Apps for the Fans
Trusted Contributor
Posts: 195
Registered: ‎03-12-2012
My Device: PlayBook
My Carrier: None

Re: libbbmsp undefined reference to Q...

Looks like I forgot to enable permission to use BBM in bar-descriptor.xml. Seems to be working now.
Sucroid.com
Sweet Apps for the Fans
Trusted Contributor
Posts: 195
Registered: ‎03-12-2012
My Device: PlayBook
My Carrier: None

Re: libbbmsp undefined reference to Q...

Looks like I spoke too fast. Still getting fatal error.
Sucroid.com
Sweet Apps for the Fans
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: libbbmsp undefined reference to Q...