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
Highlighted
Developer
Posts: 28
Registered: ‎02-24-2012
My Device: BlackBerry Z10 Limited Edition
My Carrier: Free
Accepted Solution

ImageData Error when compiling

I'm having some hard time useing ImageData api in cascades.

 

I have this line that causing problems:

 

bb::ImageData imageData = bb::ImageData::fromPixels(finalImage.bits(), bb::PixelFormat::RGBA_Premultiplied, finalImage.width(), finalImage.height(), finalImage.bytesPerLine());

 

When I compile I get these errors:

 

/Applications/Momentics.app/host_10_1_0_238/darwin/x86/usr/bin/ntox86-ld: o-g/.obj/applicationui.o: undefined reference to symbol '_ZN2bb9ImageDataD1Ev'

/Applications/Momentics.app/host_10_1_0_238/darwin/x86/usr/bin/ntox86-ld: note: '_ZN2bb9ImageDataD1Ev' is defined in DSO /Applications/Momentics.app/target_10_1_0_4651/qnx6/x86/usr/lib/libbb.so.1 so try adding it to the linker command line

make[2]: Leaving directory `/Users/avatsaev/DEV/BlackBerry10/AZR_O_Gauge/x86'

make[1]: Leaving directory `/Users/avatsaev/DEV/BlackBerry10/AZR_O_Gauge/x86'

/Applications/Momentics.app/target_10_1_0_4651/qnx6/x86/usr/lib/libbb.so.1: could not read symbols: Invalid operation

cc: /Applications/Momentics.app/host_10_1_0_238/darwin/x86/usr/bin/ntox86-ld error 1

make[2]: *** [o-g/AZR_O_Gauge] Error 1

make[1]: *** [debug] Error 2

make: *** [Simulator-Debug] Error 2

 

 

Please help.

 

 

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

Re: ImageData Error when compiling

Hi,
Try adding
LIBS += -lbb
to .pro file

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 28
Registered: ‎02-24-2012
My Device: BlackBerry Z10 Limited Edition
My Carrier: Free

Re: ImageData Error when compiling

that did the trick, thank you!