MSYS2 + Visual Studio 2017 Community here, the exact steps I take to build are:
1. Start a Visual Studio 2017 "Developer Command Prompt", which effectively run vcvars.bat
2. cd into msys64 directory, and then invoke MSYS2 within the command prompt with "msys2_shell.cmd -msys2 -use-full-path", which make msys2 inherited the envs set by vcvars
3. In MSYS2 shell, cd into /somewhere/ffmpeg-build/
4. rm -rf *
5. run "../ffmpeg-3.3/configure --prefix=/somewhre/to/install/ffmpeg-bin --toolchain=msvc" in the build folder. configure script complete successfully.
6. make -j8
and then during the build, after about half done, so many winsocks2 functions related redefinition fail the build.
And I've found an easy fix, that is "../ffmpeg-3.3/configure --prefix=/somewhre/to/install/ffmpeg-bin --toolchain=msvc --extra-cflags=-DWIN32_LEAN_AND_MEAN".
Yes, the build is success, but the question bothering me is whether it is something wrong on my side or something wrong in the ffmpeg configure script? or maybe even it is the fault of VS 2017?
Questions that occur when trying to compile FFmpeg.
2 posts • Page 1 of 1
winsock2.h rename winsock2.bak.h