From: Vadim Zeitlin Date: Thu, 16 Sep 2010 11:05:51 +0000 (+0000) Subject: Only use wxFORCE_LINK_MODULE() in mediaplayer sample in static build. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/75595b9750de618c1ccc6356159aad0918bc4786 Only use wxFORCE_LINK_MODULE() in mediaplayer sample in static build. The linking optimization this macro protects against can't happen when using DLL and so using it is at best useless and actually harmful (because it doesn't contain the correct DLL export declarations) in the latter case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/mediaplayer/mediaplayer.cpp b/samples/mediaplayer/mediaplayer.cpp index 037f2fd8aa..e06f6d1733 100644 --- a/samples/mediaplayer/mediaplayer.cpp +++ b/samples/mediaplayer/mediaplayer.cpp @@ -71,12 +71,12 @@ // 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__ +#if defined(__WXMSW__) && !defined(WXUSINGDLL) #include "wx/link.h" wxFORCE_LINK_MODULE(wxmediabackend_am) wxFORCE_LINK_MODULE(wxmediabackend_qt) wxFORCE_LINK_MODULE(wxmediabackend_wmp10) -#endif // __WXMSW__ +#endif // static wxMSW build #ifndef __WXMSW__ #include "../sample.xpm"