]> git.saurik.com Git - wxWidgets.git/commitdiff
Link with bufferoverflowu.lib for VC++ 8 and later
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Mon, 17 Oct 2005 17:46:11 +0000 (17:46 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Mon, 17 Oct 2005 17:46:11 +0000 (17:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/libraries.h [new file with mode: 0644]
include/wx/platform.h

diff --git a/include/wx/msw/libraries.h b/include/wx/msw/libraries.h
new file mode 100644 (file)
index 0000000..827f682
--- /dev/null
@@ -0,0 +1,37 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/libraries.h
+// Purpose:     Pragmas for linking libs conditionally
+// Author:      Michael Wetherell
+// Modified by:
+// RCS-ID:      $Id$
+// Copyright:   (c) 2005 Michael Wetherell
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_LIBRARIES_H_
+#define _WX_MSW_LIBRARIES_H_
+
+// Notes:
+//
+// In general the preferred place to add libs is in the bakefiles. This file
+// can be used where libs must be added conditionally, for those compilers that
+// support a way to do that.
+
+// Newer versions of VC++ support the /GS option which add buffer overflow
+// checks. This adds into the generated code calls to support functions in in
+// the runtime library.
+//
+// Starting with VC++ 8 this option is on by default, and code such as the
+// runtime library that we need to link is compiled with it. Some versions of
+// the runtime library don't include the support code, and a separate library
+// bufferoverflowu.lib must be linked. If all versions of VC++ 8 that can
+// compile wxWidgets have this lib we can link it here, if not then this will
+// have to be removed.
+//
+// More information: http://support.microsoft.com/?id=894573
+
+#if defined __VISUALC__ && __VISUALC__ >= 1400
+    #pragma comment(lib,"bufferoverflowu.lib")
+#endif
+
+#endif // _WX_MSW_LIBRARIES_H_
index 545e5f7a56aef1e504db59d003a56e01f53768da..7dd47e6e0f34405fcf0453fc7e37ad5ef1cdbfc1 100644 (file)
 #   define __STDC_EXT__ 1
 #endif
 
-/* Force linking against required libraries under Windows CE: */
+/* Force linking against required libraries under Windows: */
 #ifdef __WXWINCE__
 #   include "wx/msw/wince/libraries.h"
+#elif defined __WINDOWS__
+#   include "wx/msw/libraries.h"
 #endif
 
 /*