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: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA
Accepted Solution

Is this snippet of code correct or not?

In the hpp file:

 

#include <bb/cascades/multimedia/Camera>
//...
Camera *m_camera;

 In the cpp file:

#include <bb/cascades/multimedia/Camera>
//...
using namespace bb::cascades;
using namespace bb::cascades::multimedia;
//... in init
m_camera = new Camera();
//...OR
m_camera = new Camera(myContainer);

 I created two separate cascades projects, and in both I get the error:

(workspace path)/CameraController.cpp:43: undefined reference to 'bb::cascades::multimedia::Camera::Camera(bb::cascades::Container*)'

 

Line 43 is the last two lines shown above in the cpp file.

 

3 days struggling with this now, please hep BB devs before you guys are all gone for the (well-deserved) holidays.

 

Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Is this snippet of code correct or not?

Elsewhere in my cpp file:

 

m_camera->setPreferredWidth(768);
//...
QObject::connect(m_camera, SIGNAL(viewFinderStarted()), this, SLOT(onStartVfSuccess()));

 There are no errors on the lines above.

 

 

 

 

Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Is this snippet of code correct or not?

3 days and all I had to add was -lbbcascadesmultimedia

 

thanks bb forum