]> git.saurik.com Git - wxWidgets.git/commitdiff
Force linking of all wxMSW wxMediaCtrl backends in mediactrl sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Sep 2010 20:33:51 +0000 (20:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 9 Sep 2010 20:33:51 +0000 (20:33 +0000)
Force the linker to include all the backends in the sample executable instead
of discarding them because they are not used directly to allow testing all of
them in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/mediaplayer/mediaplayer.cpp

index ceaf85d9c3c937430def51f35a3e29f677e7c7a8..037f2fd8aa814149beac4d66a8325e1c3f40d277 100644 (file)
 #include "wx/filename.h"    // For wxFileName::GetName()
 #include "wx/config.h"      // for native wxConfig
 
+// Under MSW we have several different backends but when linking statically
+// they may be discarded by the linker (this definitely happens with MSVC) so
+// force linking them. You don't have to do this in your code if you don't plan
+// to use them, of course.
+#ifdef __WXMSW__
+    #include "wx/link.h"
+    wxFORCE_LINK_MODULE(wxmediabackend_am)
+    wxFORCE_LINK_MODULE(wxmediabackend_qt)
+    wxFORCE_LINK_MODULE(wxmediabackend_wmp10)
+#endif // __WXMSW__
+
 #ifndef __WXMSW__
     #include "../sample.xpm"
 #endif