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: 6
Registered: ‎01-22-2012
My Device: Playbook
My Carrier: N.A.
Accepted Solution

undefined reference to camera_api.h for BB10

Hi,

 

I am trying to use the camera functionality in BB10 for playbook (camera_api.h). The issue is that when I am building, I get an undefined reference error e.g. "undefined reference to `camera_open'". Is the camera functionalitly enabled in the bb10 sdk beta? If so, what libraries should I link to?

 

More generally, is there a sample app that uses he camera_api.h for bb10 playbook?

 

Thanks.

Developer
Posts: 133
Registered: ‎03-28-2011
My Device: BlackBerry 9900 & PlayBook
My Carrier: Bell

Re: undefined reference to camera_api.h for BB10

I'm unsure of what you're trying to do here.

 

Are you trying to write an app using the BlackBerry 10 NDK and deploy it to the BlackBerry PlayBook? If so, the camera API may be one of those libraries that are not currently available on the PlayBook with OS 2.0.1. You may want to stick with the BlackBerry PlayBook NDK (They are different...)


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: undefined reference to camera_api.h for BB10

There is no public sample code yet.  I am hoping to be able to publish this very soon.

It sounds like you are builgind an app without linking against the camera library (libcamapi.so).

You will need to add 'camapi' to your libraries list either via project settings -> c/c++ build settings -> linker settings (I think), or if using cascades, I believe you have to add

LIBS += -lcamapi

To your .pro file.

 

Cheers,

Sean

Developer
Posts: 92
Registered: ‎10-30-2011
My Device: Blackberry Playbook
My Carrier: Telstra LTE

Re: undefined reference to camera_api.h for BB10

The camera API doesn't work in Playbook. I tried and the Playbook is missing the library: libcamapi.so

Apparently this will be coming in OS2.1.

 

For now, the camera API is only usable on the Dev Alpha. So that's why you are receiving this error Smiley Happy 

BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: undefined reference to camera_api.h for BB10

also, as HorizonXP mentions, this is not available on PlayBook yet.

Developer
Posts: 133
Registered: ‎03-28-2011
My Device: BlackBerry 9900 & PlayBook
My Carrier: Bell

Re: undefined reference to camera_api.h for BB10

Thanks guys for confirming what I had already stated. :-P


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Highlighted
New Contributor
Posts: 6
Registered: ‎01-22-2012
My Device: Playbook
My Carrier: N.A.

Re: undefined reference to camera_api.h for BB10

Thanks for all your answers, I am not trying to load it on a playbook, just see if it builds using the bb10 sdk (just playing with the SDK). The main issue, however is that the bb10 sdk is missing the libcamapi.so library (not sure why the .h was included).

 

Thanks.

Developer
Posts: 92
Registered: ‎10-30-2011
My Device: Blackberry Playbook
My Carrier: Telstra LTE

Re: undefined reference to camera_api.h for BB10

The library is on the Dev Alpha though. You can always pull it from the device if it isn't in your NDK.

Developer
Posts: 133
Registered: ‎03-28-2011
My Device: BlackBerry 9900 & PlayBook
My Carrier: Bell

Re: undefined reference to camera_api.h for BB10

Definitely an option, but will it work on the PlayBook? Intuition says no, because of the different hardware... Unless they built it with support for both, which is possible.


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Developer
Posts: 92
Registered: ‎10-30-2011
My Device: Blackberry Playbook
My Carrier: Telstra LTE

Re: undefined reference to camera_api.h for BB10

Yeah Horizon, he's not trying to put it on Playbook so that's all good Smiley Tongue

I've already tried that as I said above Smiley Happy