In the past, the-MnO-cygwin parameter can be added when the program that needs to not depend on cygwin (mainly cyggcc_s-1.dll and cygwin1.dll) is compiled, but this parameter is only for gcc3, and gcc4 does not support this parameter, the alternative is to use mingw. The common method on the internet is mingw32 + msys for compilation. However, in cygwin, mingw32 is actually supported. After installing the relevant components, you can perform relevant work. I used this method when compiling FFMPEG, but some special processing is required when configuring parameters. The following is a summary:
I. Related tool versions
Cygwin's setup version 2.769 and cygwin1.dll version 1.7.15
GCC version 4.5.3, i686-pc-mingw32-gcc version 4.5.2 (integrated into cygwin instead of separate mingw)
Yasm version 1.2.0
FFmpeg version 0.10.2
SDL version 1.2.15
Lib.exe uses the built-in vs2005, so you need to specify the path so that the compiler in cygwin can call it.
Ii. configuration parameters
Export Path =/usr/winnt/bin: $ path
Cflags = "-I.-I .."./configure -- enable-memalign-hack -- enable-GPL -- enable-version3 -- enable-static -- enable-shared \
-- Enable-Cross-compile -- Cross-Prefix = i686-pc-mingw32--- cc = i686-pc-mingw32-gcc -- arch = x86 -- target-OS = mingw32 \
-- Enable-libx264 -- extra-libs = '-lx264-lwinmm' -- prefix =/usr/winnt \
-- Extra-cflags = '-I/usr/winnt/include-I/cygdrive/D/dx9csdk/include-MnO-cygwin' -- extra-ldflags ='-L/usr/ winnt/lib-L/cygdriver/D/dx9csdk/lib'
Iii. parameter description
1. cflags settings: fixed the problem that the header file cannot be found during compilation.
2. -- CC: The mingw compiler can support-MnO-cygwin.
3. -- enable-Cross-compile -- Cross-Prefix, however, the file generated when only the -- CC parameter is added is still dependent on the cygwin environment.
4. -- Arch -- target-OS: the two parameters must be added when the preceding two parameters are added.
5, -- enable-libx264: FFMPEG by default is not with h264 encoding, You need to download x264 compiled to specify the header file and library file path for configure Configuration
6. About dx9csdk: The New FFMPEG version supports dshow output devices. You need to download the DirectX SDK and specify the header file and library file path for configure configuration. I put it in the D: \ dx9cssdk directory.
7. Export path: ffplay depends on SDL and must be downloaded and compiled separately. Configure needs to call SDL-config for configuration. Because SDL-config is installed in a custom path (/usr/winnt/bin), you must set the environment variable to find SDL-config.
8. After the first seven items are set, the customization of filter, encoder, and decoder is the problem of disable and enable.
Iv. wince version
Mingw32ce version 0.59.1. The configuration parameters are as follows:
./Configure -- enable-neon -- enable-memalign-hack -- enable-GPL -- enable-version3 -- enable-static -- enable-shared -- disable-pic \
-- Disable-pthreads -- disable-zlib \
-- Arch = arm -- target-OS = mingw32ce -- enable-Cross-compile -- Cross-Prefix = arm-mingw32ce--- cc = 'arm-mingw32ce-gcc '\
-- Extra-cflags = "-I. -I .. -I/usr/wince/include/wceshunt-d_win32_wce = 0x0600-dunicode-March = armv7-a-mtune = cortex-a8-mfpu = neon-MnO -cygwin "\
-- Extra-ldflags = "-l/usr/wince/lib-wl, -- enable-auto-import-static-libgcc "-- extra-libs ="-lwceshunt "-- prefix =/usr/WinCE
English version (and the preceding parameters are similar, different places because I was compiled for the cortex-a8 platform, so the need for Neon command support;-static-libgcc parameters is not dependent on the libgcc_s_sjlj-1.dll; -- disable-pic is required when DLL is generated later