Sunday, May 30, 2021

Re: Build Vim Error MSys2 Environment

> 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

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 -- Bram@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 ///

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202105301202.14UC2U5w1768756%40masaka.moolenaar.net.

No comments: