Mark S. Williams wrote:
Thanks, Tony.
I did some digging. The change in question was in svn revision 57. It
appears to have introduced some sort of order-of-declaration problem
between BCC and the rest of the world. ;-)
Below is an svn patch that works for me, and the svn diff for if_ole.cpp.
Cheers,
-Mark
svn patch:
Index: if_ole.cpp
===================================================================
--- if_ole.cpp (revision 63)
+++ if_ole.cpp (working copy)
@@ -13,14 +13,19 @@
* See os_mswin.c for the client side.
*/
+#ifndef __BORLANDC__
extern "C" {
#include "vim.h"
}
+#endif
#include <windows.h>
#include <oleauto.h>
extern "C" {
+#ifdef __BORLANDC__
+#include "vim.h"
+#endif
extern HWND s_hwnd;
extern HWND vim_parent_hwnd;
}
The diff from revision 56:
D:\vim7\vim7\src>svn diff --revision 56:63 if_ole.cpp
Index: if_ole.cpp
===================================================================
--- if_ole.cpp (revision 56)
+++ if_ole.cpp (revision 63)
@@ -13,11 +13,14 @@
* See os_mswin.c for the client side.
*/
+extern "C" {
+#include "vim.h"
+}
+
#include <windows.h>
#include <oleauto.h>
extern "C" {
-#include "vim.h"
extern HWND s_hwnd;
extern HWND vim_parent_hwnd;
}
Hm. Bram must have had a reason to move vim.h up in the first place.
Let's look at the patches' README... I guess the change corresponds to
the following patch:
1741 7.0.045 (extra) Win32: MSVC 2005 compiler warnings for OLE version
Let's dig the patch headers... Yeah, that's it:
Patch 7.0.045 (extra)
Problem: Win32: Warnings when compiling OLE version with MSVC 2005.
Solution: Move including vim.h to before windows.h. (Ilya Bobir)
Files: src/if_ole.cpp
I wonder what it is, that MSVC needs vim.h before windows.h, and BCC
needs it after... And if the "right" order varies from one compiler to
the next, I wonder what is best for gcc... Well, Steve already compiled
a 7.0.51 for Windows with gcc, apparently without problems. Is anyone
actually _using_ that OLE interface? Do the OLE functions work (after
patch 45)? And which compiler was used?
Best regards,
Tony.