Build Vim Error MSys2 Environment

16 views
Skip to first unread message

Ni Va

unread,
May 29, 2021, 3:13:16 PM5/29/21
to vim_use
Hi,

I encounter an error trying build Vim under Win10 OS and Msys2 with gcc and make -f Make_ming.mak as is  :



gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -DMS_WIN64 -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -march=x86-64 -Wall -I./lua-5.3.5/src/include -I./lua-5.3.5/src -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_RUBY -I C:/Ruby30/include/ruby-3.0.0 -I C:/Ruby30/include/ruby-3.0.0/i386-mingw32 -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby300.dll\" -DRUBY_VERSION=30 -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python39.dll\" -O3 -fomit-frame-pointer -freg-struct-return beval.c -o gobjx86-64/beval.o
In file included from beval.c:11:
beval.c: In function ‘find_word_under_cursor’:
vim.h:1704:18: error: ‘INT_MAX’ undeclared (first use in this function)
 1704 | # define MAXCOL  INT_MAX  // maximum column number
      |                                        ^~~~~~~
vim.h:1704:18: note: in definition of macro ‘MAXCOL’
 1704 | # define MAXCOL  INT_MAX  // maximum column number
      |                  ^~~~~~~
beval.c:12:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?
   11 | #include "vim.h"
  +++ |+#include <limits.h>
   12 |
In file included from beval.c:11:
vim.h:1704:18: note: each undeclared identifier is reported only once for each function it appears in
 1704 | # define MAXCOL  INT_MAX  // maximum column number



Bram Moolenaar

unread,
May 30, 2021, 8:02:39 AM5/30/21
to vim...@googlegroups.com, Ni Va
The limits.h file is only included when running configure.
I can't think of a good reason, every build environment should have
limits.h. I'll move the include.

--
Vi beats Emacs to death, and then again!
http://linuxtoday.com/stories/5764.html

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Ni Va

unread,
May 31, 2021, 7:46:19 AM5/31/21
to vim_use
Thank you.
Reply all
Reply to author
Forward
0 new messages