On 5/20/2018 12:30 PM, Bram Moolenaar wrote:
I want to try debugging on MS-Windows with gdb. I normally build with
MSVC, but I don't see a way to use that executable with gdb (perhaps
it's possible with some compiler flag?).
So I'll use MinGW for compiling. MinGW provides gcc and make, so I
expect this to work:
make -f Make_ming.mak GUI=no DEBUG=yes
This gives an error in diff.c:
storage size of 'st' isn't known.
Hmm. I can work around it by changing the condition in vim.h:
/* Use 64-bit stat structure if available. */
#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
# define HAVE_STAT64
typedef struct _stat64 stat_T;
#else
typedef struct stat stat_T;
#endif
So use "struct stat". I wonder why this change is needed. perhaps the
#ifdef is wrong?
Then it compiles many files but fails when building iscygpty.c .
It complains that _WIN32_WINNT and WINVER differ. That's because the
build file has:
$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
$(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT
-D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
Overruling _WIN32_WINNT for one file seems like a bad idea, why was this
added? But building iscygpty.c with WINVER set to 0x0501 apparently
doesn't work.
So instead I specify WINVER to be 0x0600. I wonder how it can ever work
without that. Perhaps we should make it the default?
In my opinion, the fundamental question appears to be should Vim
continue to support the XP platform. The data structures that are
generating compiler errors are defined only for Vista or later (see
winbase.h).
That said, I have been building 32-bit vim/gvim on an XP platform using
mingw without a problem. Unbeknownst to me, I been doing that before
and after the patches v7.4.2016 and v7.4.1963. If I remove the -U and
-D options from the target, I get, I assume, the same compilation errors
that you do. In other words, the resulting executable (with patches)
works fine under XP.
-mike
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.