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?
sys/ioctl.h
belongs tocygwin-devel
package. Not sure it is used by the cross compiler. I think you needmingw64-x86_64-headers
and possiblyw32api-headers
– matzeri--host-os
to cross-compile when you should be using--target-os
. – Hashim Aziz