[FFmpeg-devel] Compiling FFMPeg fails on mingw systems
GizmoSDK
gizmo_video
Thu Nov 15 23:28:21 CET 2007
15 nov 2007 kl. 22.00 skrev GizmoSDK:
> The following config ...
>
> ./configure --enable-memalign-hack --disable-network
>
> gives during compilation...
>
> gcc -I"/mingw/ffmpeg"/libavcodec -DHAVE_AV_CONFIG_H -
> D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/mingw/
> ffmpeg" -I"/mingw/ffmpeg" -I"/mingw/ffmpeg"/libavutil -fomit-frame-
> pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-
> optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -O3
> -c -o os_support.o os_support.c
> os_support.c:31:24: error: sys/select.h: No such file or directory
> make[1]: *** [os_support.o] Error 1
> make[1]: Leaving directory `/mingw/ffmpeg/libavformat'
> make: *** [lib] Error 2
>
> where...
>
> amo at MACXP /mingw/ffmpeg
> $ gcc --version
> gcc.exe (GCC) 4.1.2
> Copyright (C) 2006 Free Software Foundation, Inc.
>
> $ cat version.h
> #define FFMPEG_VERSION "SVN-r11038"
An update....
It seemes as the config.h is missing HAVE_CLOSESOCK and HAVE_WINSOCK2
as mingw is not a POSIX compliant env.
The following patch enables those defines but only add linking to
network libs if network is enabled
Index: configure
===================================================================
--- configure (revision 11038)
+++ configure (working copy)
@@ -1625,14 +1625,14 @@
##########################################
# Network check
-if enabled network; then
- # Prefer arpa/inet.h over winsock2
- if check_header arpa/inet.h ; then
- check_func closesocket
- elif check_header winsock2.h ; then
+# Prefer arpa/inet.h over winsock2
+if check_header arpa/inet.h ; then
+ check_func closesocket
+elif check_header winsock2.h ; then
+ if enabled network; then
network_extralibs="-lws2_32"
- check_func2 winsock2.h closesocket
fi
+ check_func2 winsock2.h closesocket
fi
##########################################
/Anders Mod?n
More information about the ffmpeg-devel
mailing list