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
Developer
Developer
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
My Carrier: MTS Ukraine
Accepted Solution

MediaPlayer in c++

Hello there,

 

I'm having some problems with MediaPlayer  in C++. So I've added 

#include<bb/multimedia/MediaPlayer>

 and

using namespace bb::multimedia;

 and when I am trying to create a MediaPlayer as written in documentation:

MediaPlayer mp(this);

 I am getting the following errors:

 

../src/Alarm.cpp:107: undefined reference to `bb::multimedia::MediaPlayer::MediaPlayer(QObject*)'
../src/Alarm.cpp:107: undefined reference to `bb::multimedia::MediaPlayer::~MediaPlayer()'

 

Please advise.

 

 

 

 

 

Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com
Regular Contributor
Posts: 51
Registered: ‎02-24-2012
My Device: Blackberry Whatever
My Carrier: Ukrtelecom

Re: MediaPlayer in c++

[ Edited ]

https://developer.blackberry.com/cascades/reference/multimedia_mediaplayer.html :

 

To link against these classes, add the following line to your .pro file:

LIBS += -lbbcascadesmultimedia
Developer
Developer
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
My Carrier: MTS Ukraine

Re: MediaPlayer in c++

Unfortunately I've added that at the beggining and it is not working. Forgot to write about this in initial post. 

Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: MediaPlayer in c++

Try to add -lbbmultimedia

Andrey Fidrya, @zmeyc on twitter
Developer
Developer
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
My Carrier: MTS Ukraine

Re: MediaPlayer in c++

Zmey, you rock as usual. Thanks a lot! 

Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com