Suresh Govindachar wrote:
Bram Moolenaar wrote:
Markus Trenkwalder wrote:
checked out vim-7.1a.001 today from svn (#263) and tried to
compile it with mingw-gcc and got the following error:
8
$ make -f Make_ming.mak
gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400
-DHAVE_PATHDEF -DFEAT_BIG -DHAVE_GETTEXT -DHAVE_LOCALE_H
-DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG
-DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME
-DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -O3
-fomit-frame-pointer -freg-struct-return -s gui_w32.c -o
gobj/gui_w32.o gui_w32.c:236: error: redefinition of `struct
tagNMTTDISPINFOA' gui_w32.c:246: error: redefinition of `struct
tagNMTTDISPINFOW' make: *** [gobj/gui_w32.o] Error 1 8
I get the same error message. I recursively grepped for
NMTTDISPINFO and examined the output, but did not find any
redefinition! No clue where the compiler is finding the
redefinitions.
My naive solution to this problem is:
8
--- src/gui_w32.c.000 Mon May 7 08:26:54 2007
+++ src/gui_w32.c Mon May 7 07:01:09 2007
@@ -232,7 +232,7 @@
LPARAM lParam;
} NMTTDISPINFO_NEW;
-#ifndef LPNMTTDISPINFO
+#if !defined(LPNMTTDISPINFO) !defined(TOOLTIPTEXTA)
typedef struct tagNMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
8
What does TOOLTIPTEXTA have to do with this? I don't understand
why you try to solve it this way.
Someone else also reported this problem while it worked OK
earlier. Perhaps there is something wrong with the way you
obtained the sources?
(Tony reported working around the error message by not using svn.)
I got the sources from svn the same why I have always been getting
the sources (the whole process of get sources, build, deploy,
update runtime is automated in scripts).
The symbol is defined in mingw in the file '/include/commctrl.h' through
the file '/include/pshpack1.h'. The relevant part in mingw's version of
commctrl.h (starting at line 2368) is:
8
...
typedef struct tagNMTTDISPINFOA {
NMHDR hdr;
LPSTR lpszText;
char szText[80];
HINSTANCE hinst;
UINT uFlags;
#if (_WIN32_IE = 0x0300)
LPARAM lParam;
#endif
} NMTTDISPINFOA, *LPNMTTDISPINFOA;
#define TOOLTIPTEXTANMTTDISPINFOA
#define LPTOOLTIPTEXTA LPNMTTDISPINFOA
...
8
So the only chance I had to detect if tagNMTTDISPINFOA is defined alredy
was to test one of the TOOLTIP macros. I know this is not the most
beautyful solution but I just wanted to show the problem and provide one
possible solution.
I'll try to compile the FTP-sources now and see if the problem still
exists there -- report will follow.
Regards
Markus