From 1bc5ddea1595206819d75bc61f57c47e534ee46f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 10 Nov 2012 00:53:42 +0000 Subject: [PATCH] Fix link errors with VC 11 in DLL STL build. Don't declare wxWindowList as DLL-exported. It's unnecessary and appears to create problems for VC 11. Closes #14741. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 9 +++++---- include/wx/listimpl.cpp | 2 +- include/wx/utils.h | 2 +- src/common/list.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 2144dea9db..cb6bcbae62 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -148,21 +148,22 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) decl _WX_LIST_HELPER_##liT \ { \ typedef elT _WX_LIST_ITEM_TYPE_##liT; \ + typedef std::list BaseListType; \ public: \ + static BaseListType EmptyList; \ static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \ }; \ \ WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ - decl liT : public std::list \ + class liT : public std::list \ { \ private: \ typedef std::list BaseListType; \ - static BaseListType EmptyList; \ \ bool m_destroy; \ \ public: \ - decl compatibility_iterator \ + class compatibility_iterator \ { \ private: \ /* Workaround for broken VC6 nested class name resolution */ \ @@ -174,7 +175,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) \ public: \ compatibility_iterator() \ - : m_iter(EmptyList.end()), m_list( NULL ) {} \ + : m_iter(_WX_LIST_HELPER_##liT::EmptyList.end()), m_list( NULL ) {} \ compatibility_iterator( liT* li, iterator i ) \ : m_iter( i ), m_list( li ) {} \ compatibility_iterator( const liT* li, iterator i ) \ diff --git a/include/wx/listimpl.cpp b/include/wx/listimpl.cpp index fec23d206c..d9a4ffadf2 100644 --- a/include/wx/listimpl.cpp +++ b/include/wx/listimpl.cpp @@ -17,7 +17,7 @@ { \ delete X; \ } \ - name::BaseListType name::EmptyList; + _WX_LIST_HELPER_##name::BaseListType _WX_LIST_HELPER_##name::EmptyList; #else // !wxUSE_STD_CONTAINERS #undef WX_DEFINE_LIST_2 diff --git a/include/wx/utils.h b/include/wx/utils.h index 1eed877f4b..3df820da57 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -54,7 +54,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt; class WXDLLIMPEXP_FWD_BASE wxProcess; class WXDLLIMPEXP_FWD_CORE wxFrame; class WXDLLIMPEXP_FWD_CORE wxWindow; -class WXDLLIMPEXP_FWD_CORE wxWindowList; +class wxWindowList; class WXDLLIMPEXP_FWD_CORE wxEventLoop; // ---------------------------------------------------------------------------- diff --git a/src/common/list.cpp b/src/common/list.cpp index 01fb9664bb..58c38ea33a 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -762,6 +762,6 @@ void _WX_LIST_HELPER_wxStringListBase::DeleteFunction( wxString WXUNUSED(X) ) { } -wxStringListBase::BaseListType wxStringListBase::EmptyList; +_WX_LIST_HELPER_wxStringListBase::BaseListType _WX_LIST_HELPER_wxStringListBase::EmptyList; #endif // !wxUSE_STD_CONTAINERS -- 2.45.2