On Wednesday, February 13, 2019 at 1:03:10 PM UTC-6, John Marriott wrote:
> On 14-Feb-2019 03:51, Ben Fritz wrote:
> > I was trying to set up for building Vim on a Windows 10 installation where 
> > I haven't done that before.
> >
> > I tried the Msys distribution of mingw-64 first, and after I installed make 
> > and gcc using the package manager, I got compiler errors all over the 
> > place. Most errors to start with were for pretty basic things like 
> > _MAX_PATH not being defined (MAX_PATH is defined instead). I modified the 
> > code for simple macro replacements like that, and a few #ifdefs that were 
> > taking the wrong branch, but then I got to code in os_win32 that tried to 
> > use _putenv and _wputenv functions, which are not defined, and gave up that 
> > approach after a long time searching for a definition.
> >
> > Next I tried the MingW-W64-builds package. That doesn't include make 
> > either, but it has mingw32-make so I tried that, and got errors reading the 
> > makefile. Not seeing any documentation for this package, I moved on...
> >
> > ...to the normal, older 32-bit Mingw, which I have used in the past. I 
> > installed the gcc tools and Msys, tried to build Vim, and immediately got 
> > errors for a missing struct definition for 64-bit file types. Searching on 
> > the error led to suggestions to use Mingw-64.
> >
> > What am I doing wrong? Surely, somebody out there is still compiling Vim 
> > using Mingw? The makefiles are still there, I assume they work for someone.
> >
> > If you're that someone, what Mingw distribution are you using? Did you need 
> > to do any extra setup/installation beyond installing gcc and make?
> >
> Hi Ben,
> 
> I am building vim and gvim using mingw64 on Win8.1 and Win7. I've not 
> tried Win10 but I don't imagine it would be much different.
> 
> Firstly, I use the mingw64 build from here: 
> https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/
> Try the 8.1 package. It includes make, but it is called 
> "mingw32-make.exe", so I copy it to "make.exe". Make sure that the 
> mingw64/bin folder within the package is in the path.
> 
> I put the vim source in the folder <path_to_vim_source>/vim. I make no 
> modifications to the code (except for a few changes in feature.h).
> In the <path_to_vim_source> folder I put this batch file which I call 
> "make_it.cmd":
> <start batch>
> @echo off
> 
> setlocal
> set SRC_DIR=vim\src
> set /a NR_JOBS=%NUMBER_OF_PROCESSORS% + 1
> set COMMON_VARS=OPTIMIZE=MAXSPEED ARCH=native ICONV= GETTEXT= IME=no 
> DYNAMIC_IME=no POSTSCRIPT=no OLE=no WINVER=0x0603 CSCOPE=no NETBEANS=no 
> XPM=no DIRECTX=no FEATURES=NORMAL CHANNEL=no
> set GUI_VARS=%COMMON_VARS% LFLAGS="-Wl,-nxcompat,-dynamicbase -mwindows"
> set NOGUI_VARS=%COMMON_VARS% LFLAGS="-Wl,-nxcompat,-dynamicbase"
> set MAKEFILE=Make_ming.mak
> 
> title Building gvim...
> 
> make --directory=%SRC_DIR% GUI=yes %GUI_VARS% --environment-overrides 
> --jobs=%NR_JOBS% --makefile=%MAKEFILE% gvim.exe
> 
> title Building vim...
> 
> make --directory=%SRC_DIR% GUI=no %NOGUI_VARS% --environment-overrides 
> --jobs=%NR_JOBS% --makefile=%MAKEFILE% all
> 
> title Complete
> 
> exit /b 0
> </end batch>
> 
>  From the <path_to_vim_source> folder I run the batch file. Note that 
> the make file is "Make_ming.mak", I am on Win8.1 hence the WINVER of 603 
> and the settings are for my specific build.
> 
> I hope this helps!
> Cheers
> John

Thanks for the help! I had tried using that mingw download and had trouble, but 
it turns out my trouble was because the automatic ARCH detection fails (sed 
commands don't seem designed for running a cmd.exe shell, even after manually 
downloading a sed binary for Windows).

If I manually specify:

mingw32-make -f Make_ming.mak ARCH=x86-64

...then the build succeeds!

-- 
-- 
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.

Raspunde prin e-mail lui