Re: [Ekiga-devel-list] Mingw32 : Having problem with ffmpeg



Am Mittwoch, den 10.06.2009, 11:29 +0200 schrieb Hillereau Paul:
> Now ptlib had been compiled, I have difficulties with opal. I have 2 
> errors when h264 and h263, I might disable those codecs, but it might be 
> difficult to compile ekiga after ?
> I can disable h264 by adding --disable-h264 to confopal in the main 
> Makefile, but I did  not find a similar option to disable  h263.
> Here is my error (it's above the same for h263) :
> 
> make[3]: Entering directory 
> `/home/devel/win32/ekiga/win32/opal/plugins/video/H.264'
> i586-mingw32msvc-g++ -gstabs -I../../../include 
> -I/home/devel/win32/ekiga/win32/include   -I../common -I../../ 
> -DLIB_DIR='"/home/devel/win32/ekiga/win32/lib"' 
> -DVC_PLUGIN_DIR='"opal-3.7.0/codecs/video"' -DLICENCE_MPL   -g3 -ggdb 
> -O0 -D_DEBUG -I/home/devel/win32/ekiga/win32/include -march=pentium-mmx 
> -DPTRACING -c h264-x264.cxx -o obj/h264-x264.o
> In file included from ../common/ffmpeg.h:67,
>                  from ../common/dyna.h:44,
>                  from h264-x264.cxx:53:
> ../common/vs-stdint.h:33:2: error: #error "Use this header only with 
> Microsoft Visual C++ compilers!"
snip

You are not alone with that. They have changed things again. I tried
last night and had exactly the same build errors. Find attached the
patch for ptlib and the two for opal. Place them into the diff directory
and make the copy sections of the Makefile look as in attached addtomake
file.

Regards
Michael
diff -ur src/ptlib/configure ptlib/configure
--- src/ptlib/configure	2009-06-09 17:47:00.637030459 +0200
+++ ptlib/configure	2009-06-09 20:01:25.481030439 +0200
@@ -4520,7 +4520,7 @@
 		   TARGETDIR=msos ;
 		   SHAREDLIBEXT="dll" ;
 		   STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
-		   ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32 -liphlpapi -lole32" ;
+		   ENDLDLIBS="-lwinmm -lwsock32 -lws2_32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32 -liphlpapi -lole32" ;
 		   NEEDS_PTHREADS=no ;
 		   { echo "$as_me:$LINENO: checking for swab" >&5
 echo $ECHO_N "checking for swab... $ECHO_C" >&6; }
diff -ur src/ptlib/configure.ac ptlib/configure.ac
--- src/ptlib/configure.ac	2009-06-09 17:47:00.653032217 +0200
+++ ptlib/configure.ac	2009-06-09 19:59:54.409031582 +0200
@@ -302,7 +302,7 @@
 		   TARGETDIR=msos ;
 		   SHAREDLIBEXT="dll" ;
 		   STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
-		   ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32 -liphlpapi -lole32" ;
+		   ENDLDLIBS="-lwinmm -lwsock32 -lws2_32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32 -liphlpapi -lole32" ;
 		   NEEDS_PTHREADS=no ;
 		   AC_CHECK_FUNC([swab], [AC_DEFINE([USE_SYSTEM_SWAB], [], [Use system swab()] )] )
 		   HAS_SHM_VIDEO=
diff -ur src/ptlib/src/ptlib/common/sockets.cxx ptlib/src/ptlib/common/sockets.cxx
--- src/ptlib/src/ptlib/common/sockets.cxx	2009-05-27 17:13:56.320289152 +0200
+++ ptlib/src/ptlib/common/sockets.cxx	2009-06-09 19:59:54.413033488 +0200
@@ -31,6 +31,11 @@
  * $Date: 2009-05-25 05:26:23 +0200 (Mo, 25. Mai 2009) $
  */
 
+#if defined(__MINGW32__) && (!defined(WINVER) || (WINVER == 0x500)) 
+#undef WINVER
+#define WINVER 0x501
+#endif  // __MINGW32__
+
 #include <ptlib.h>
 
 #include <ptlib/sockets.h>
@@ -60,8 +65,10 @@
                                 DWORD cbTransferred,
                                 LPWSAOVERLAPPED lpOverlapped,
                                 DWORD dwFlags);
-                                
 
+#if defined(__MINGW32__) && (WINVER < 0x500)
+#undef AI_NUMERICHOST
+#endif  // __MINGW32__
 #endif  // _WIN32_WCE
 #endif  // _WIN32
 #endif // P_QOS
diff -ur src/opal/plugins/video/common/ffmpeg.h opal/plugins/video/common/ffmpeg.h
--- src/opal/plugins/video/common/ffmpeg.h	2009-06-09 17:47:35.337032739 +0200
+++ opal/plugins/video/common/ffmpeg.h	2009-06-09 22:07:03.941034240 +0200
@@ -63,7 +63,7 @@
 
 
 extern "C" {
-#ifdef _WIN32
+#if defined (_WIN32) && defined (_MSC_VER)
 #include "vs-stdint.h"
 #define LIBAVCODEC_HEADER   "libavcodec\avcodec.h"
 #pragma warning(push)
diff -ur opal.pre/plugins/video/H.263-1998/h263-1998.cxx opal/plugins/video/H.263-1998/h263-1998.cxx
--- opal.pre/plugins/video/H.263-1998/h263-1998.cxx	2009-06-09 22:08:50.361264887 +0200
+++ opal/plugins/video/H.263-1998/h263-1998.cxx	2009-06-09 22:26:29.357035570 +0200
@@ -46,6 +46,10 @@
 
  */
 
+#ifndef PLUGIN_CODEC_DLL_EXPORTS
+#include "plugin-config.h"
+#endif
+
 #define _CRT_SECURE_NO_DEPRECATE
 
 #include "h263-1998.h"
diff -ur opal.pre/plugins/video/H.263-1998/Makefile.in opal/plugins/video/H.263-1998/Makefile.in
--- opal.pre/plugins/video/H.263-1998/Makefile.in	2009-06-09 22:08:50.361264887 +0200
+++ opal/plugins/video/H.263-1998/Makefile.in	2009-06-09 22:24:50.941032598 +0200
@@ -33,6 +33,7 @@
 COMMONDIR	=../common
 PLUGINDIR	=../../
 OBJDIR 		=./obj
+PLUGINDIR	=../..
 
 CC	 	= CC@
 CFLAGS	 	= CFLAGS@ 
@@ -42,6 +43,7 @@
 STDCCFLAGS	= STDCCFLAGS@
 LIBAVCODEC_CFLAGS= LIBAVCODEC_CFLAGS@
 LDFLAGS		= LDFLAGS@ -lavcodec -lavutil
+EXTRACFLAGS	=-I$(PLUGINDIR)
 HAVE_LIBAVCODEC_RTP_MODE= HAVE_LIBAVCODEC_RTP_MODE@
 
 ifdef HAVE_LIBAVCODEC_RTP_MODE
@@ -65,7 +67,7 @@
 
 $(OBJDIR)/%.o : %.cxx
 	@mkdir -p $(OBJDIR) >/dev/null 2>&1
-	$(CXX) -I../../../include $(EXTRACCFLAGS) $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) -c $< -o $@
+	$(CXX) -I../../../include $(EXTRACCFLAGS) $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) $(EXTRACFLAGS) -c $< -o $@
 
 PLUGIN	= ./$(BASENAME)_video_pwplugin.$(PLUGINEXT)
 STATIC	= ./lib$(BASENAME)_video_s.a
	$(CP) -r $(SRCDIR)/$(PTLIB_ARCHIVE) $(PTLIB_DIR)
	(cd $(PTLIB_DIR)/; patch -p1 < $(EKIGA_WIN32_DIFF_DIR)/ptlib_ws2ip6.diff )
....
	$(CP) -r $(SRCDIR)/$(OPAL_ARCHIVE) $(OPAL_DIR)
	(cd $(OPAL_DIR)/; patch -p1 < $(EKIGA_WIN32_DIFF_DIR)/opal_stdint.diff )
	(cd $(OPAL_DIR)/; patch -p1 < $(EKIGA_WIN32_DIFF_DIR)/opal_h263dll.diff )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]