In my `frame.hpp` header file I have
Code: Select all
#include <wx/mediactrl.h>
class Frame : public wxFrame
Code: Select all
protected:
wxMediaCtrl* mediaCtrl;
Code: Select all
playButton = new wxButton(panel, 1000, wxT("|>"), wxDefaultPosition, wxDefaultSize, 0);
playButton->Connect(1000, wxEVT_MEDIA_PLAY, (wxObjectEventFunction) (wxEventFunction) (wxMediaEventFunction) &Frame::Play);
Code: Select all
mediaCtrl = new wxMediaCtrl(panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString);
Code: Select all
void Frame::Play(wxMediaEvent& event)
{
// stopped = false;
int song_index = playlistBox->GetSelection();
wxString song_str = playlistBox->GetString(song_index);
std::string song;
wxString wxsong;
song = std::string(wxsong);
song = "/home/apoorv/Music/mod/%s", "song_str";
// std::cout << song << std::endl;
mediaCtrl->Load(song);
mediaCtrl->Play();
event.Skip();
// timer->Start(1000);
}
Code: Select all
/usr/include/wx-3.0/wx/mediactrl.h:137: undefined reference to `vtable for wxMediaCtrl'
/usr/bin/ld: /usr/include/wx-3.0/wx/mediactrl.h:138: undefined reference to `wxMediaCtrl::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&, wxValidator const&, wxString const&)'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
./build.sh: line 12: ./musicApp: No such file or directory