]> git.saurik.com Git - wxWidgets.git/commitdiff
Add system libs in msvc/wx/setup.h too.
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 9 Apr 2010 06:55:19 +0000 (06:55 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 9 Apr 2010 06:55:19 +0000 (06:55 +0000)
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

index 81a92417bbc81290fc12b5588dd2099b219eda05..0cd34e3451ab39b93b33aadf643d418114717508 100644 (file)
         #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