I am trying to use wxWidgets and the wxMediaCtrl to play some video files. However, I am having issue linking my application with the wxMediaCtrl. I looked at some wxWidgets documentation but it is not clear on what I should do.
So, I have an application using it and in my top level CMakeLists, I use wxWidgets as follows:
find_package(wxWidgets REQUIRED core base)
INCLUDE(${wxWidgets_USE_FILE})
I think here I should use other libraries too (related to wxMediaCtrl) but have no idea what they are called.
Then I link my app as:
TARGET_LINK_LIBRARIES(${NAME} ${wxWidgets_LIBRARIES})
Now, when I do this, I get the linker errors whereever I use wxMediaCtrl as:
undefined reference to `wxMediaCtrl::GetPlaybackRate()
undefined reference to `vtable for wxMediaCtrl'
And there are multiple instances of these for various methods of wxMediaCtrl.
Ok, I solved by problem by setting:
find_package(wxWidgets REQUIRED core base media)
I had to add the media component as well. I do not know how to get a list of available components in wxWidgets yet.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.