Reputation: 463
I want to compile ffmpeg project with mingw-w64 compiler in cygwin environment. I took the following steps:
installed cygwin and mingw-w64 package with the setup-x86_64.exe and git clone the ffmpeg project from https://git.ffmpeg.org/ffmpeg.git.
entered into ffmpeg folder, executed the folloing commands.
./configure --host-os=x86_64-w64-mingw32 --enable-shared --disable-static
make
I found the make command didn't invoke the compiler from mingw-w64, instead it invoked the compiler from cygwin, I have tried the command "make CC=x86_64-w64-mingw32-gcc", but it failed with some errors about missing header files as follows:
fatal error: sys/ioctl.h: No such file or directory
I think these header files have been installed. which command is correct? direct invocation of command make or the command with CC option? I want to use the compiler from mingw-w64 to compile ffmpeg, how can I achieve my goal?
Upvotes: 3
Views: 1277
Reputation: 16930
Use apt-cyg with:
# apt-cyg packageof ioctl.h
cygwin-devel: usr/include/sys/ioctl.h
mingw64-x86_64-headers: usr/x86_64-w64-mingw32/sys-root/mingw/include/ddk/usbstorioctl.h
mingw64-x86_64-headers: usr/x86_64-w64-mingw32/sys-root/mingw/include/devioctl.h
mingw64-x86_64-headers: usr/x86_64-w64-mingw32/sys-root/mingw/include/usbioctl.h
mingw64-x86_64-headers: usr/x86_64-w64-mingw32/sys-root/mingw/include/winioctl.h
w32api-headers: usr/include/w32api/ddk/usbstorioctl.h
w32api-headers: usr/include/w32api/devioctl.h
w32api-headers: usr/include/w32api/usbioctl.h
w32api-headers: usr/include/w32api/winioctl.h
Thus the file belong to the cygwin-devel
package.
Install with apt-cyg install cygwin-devel
.
Upvotes: 1