From a9d41efb745c99332c486532f9689fbec54345e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 9 Apr 2010 06:55:19 +0000 Subject: [PATCH] Add system libs in msvc/wx/setup.h too. This makes it possible to use static build of wx from VC++ by just including its headers. Even though it's common to have these libs in your settings, it's not always the case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/msvc/wx/setup.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h index 81a92417bb..0cd34e3451 100644 --- a/include/msvc/wx/setup.h +++ b/include/msvc/wx/setup.h @@ -177,3 +177,26 @@ #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla")) #endif #endif // wxUSE_GUI + + +#ifndef WXUSINGDLL + // Make sure all required system libraries are added to the linker too when + // using static libraries. + #pragma comment(lib, "kernel32") + #pragma comment(lib, "user32") + #pragma comment(lib, "gdi32") + #pragma comment(lib, "comdlg32") + #pragma comment(lib, "winspool") + #pragma comment(lib, "winmm") + #pragma comment(lib, "shell32") + #pragma comment(lib, "comctl32") + #pragma comment(lib, "ole32") + #pragma comment(lib, "oleaut32") + #pragma comment(lib, "uuid") + #pragma comment(lib, "rpcrt4") + #pragma comment(lib, "advapi32") + #pragma comment(lib, "wsock32") + #if wxUSE_URL_NATIVE + #pragma comment(lib, "wininet") + #endif +#endif // !WXUSINGDLL