From 316da5d4686259632d4c8c6e6dddb724053fe372 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Aug 2014 12:44:40 +0000 Subject: [PATCH] Auto-link expat and zlib even in non-GUI programs when using MSVC. These libraries are not GUI-specific and should be included even in console applications. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/msvc/wx/setup.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h index 57a18b10d6..09e435b228 100644 --- a/include/msvc/wx/setup.h +++ b/include/msvc/wx/setup.h @@ -155,15 +155,18 @@ #endif #if wxUSE_XML && !defined(wxNO_XML_LIB) #pragma comment(lib, wxBASE_LIB_NAME("xml")) + #if !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat")) + #endif #endif #if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL) #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex")) #endif +#if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib")) +#endif #if wxUSE_GUI - #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL) - #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat")) - #endif #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL) #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg")) #endif @@ -173,9 +176,6 @@ #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL) #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff")) #endif - #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL) - #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib")) - #endif #pragma comment(lib, wxTOOLKIT_LIB_NAME("core"))