-// 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")
+/* VC++ 5 didn't include oleacc.lib, though it came with the PSDK */
+#if defined __VISUALC__ && (wxUSE_ACCESSIBILITY || __VISUALC__ >= 1200)
+#pragma comment(lib, "oleacc")