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
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
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
Please use plain text.
Regular Contributor
aesteral
Posts: 51
Registered: ‎02-24-2012
My Device: Blackberry Whatever

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
Please use plain text.
Developer
Developer
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook

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
Please use plain text.
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: MediaPlayer in c++

Try to add -lbbmultimedia

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
Developer
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook

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
Please use plain text.