[Xvid-devel] Compilation of Latest SVN
Brendan Brewster
brendan.brewster at gmail.com
Fri Jul 20 06:18:27 CEST 2012
Hi,
I am using a moderately older version of MinGW and have not had any true
problems compiling XviD in the past.
I obtained the latest SVN (first time in a long while), compiled the
xvidcore.dll and xvidvfw.dll fine but had issues compiling the dshow module.
$ make DXTREE=/d/dx90/
D: =build
C: ./config.c
C: ./debug.c
C: ./Configure.cpp
In file included from <command line>:3:
d:/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
In file included from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:52,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpc.h:2,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wtypes.h:1,
from d:/dx90/mingw_dshow_port.h:1,
from <command line>:3:
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wingdi.h:3:1:
warning: this is the location of the previous definition
C: ./CAbout.cpp
In file included from <command line>:3:
d:/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
In file included from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:52,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpc.h:2,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wtypes.h:1,
from d:/dx90/mingw_dshow_port.h:1,
from <command line>:3:
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wingdi.h:3:1:
warning: this is the location of the previous definition
C: ./CXvidDecoder.cpp
In file included from <command line>:3:
d:/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
In file included from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:52,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpc.h:2,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wtypes.h:1,
from d:/dx90/mingw_dshow_port.h:1,
from <command line>:3:
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wingdi.h:3:1:
warning: this is the location of the previous definition
src/CXvidDecoder.cpp: In member function `virtual long int
CXvidDecoder::CompleteConnect(PIN_DIRECTION, IPin*)':
src/CXvidDecoder.cpp:966: error: `HWND_MESSAGE' was not declared in this
scope
make: *** [CXvidDecoder.obj] Error 1
I patched CXvidDecoder.h as follows (to define HWND_MESSAGE if needed).
$ diff -u src/CXvidDecoder.h.v0 src/CXvidDecoder.h
--- src/CXvidDecoder.h.v0 2012-07-19 23:41:58.000000000 -0400
+++ src/CXvidDecoder.h 2012-07-19 23:49:09.375000000 -0400
@@ -29,6 +29,10 @@
#include <xvid.h>
#include "IXvidDecoder.h"
+#ifndef HWND_MESSAGE
+#define HWND_MESSAGE ((HWND)-3)
+#endif
+
#define XVID_NAME_L L"Xvid MPEG-4 Video Decoder"
/* --- fourcc --- */
I then retried make.
$ make DXTREE=/d/dx90/
C: ./CXvidDecoder.cpp
In file included from <command line>:3:
d:/dx90/mingw_dshow_port.h:6:1: warning: "_WINGDI_" redefined
In file included from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/windows.h:52,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpc.h:2,
from
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wtypes.h:1,
from d:/dx90/mingw_dshow_port.h:1,
from <command line>:3:
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/wingdi.h:3:1:
warning: this is the location of the previous definition
W: ./xvid.ax.rc
L: xvid.ax
Creating library file: xvid.ax.a
CXvidDecoder.obj:CXvidDecoder.cpp:(.text+0x1b9b): undefined reference to
`GetStockObject at 4'
collect2: ld returned 1 exit status
make: *** [xvid.ax] Error 1
So, I then patched the Makefile after some further research as follows (to
pick up the gdi32 lib).
$ diff -u Makefile.v0 Makefile
--- Makefile.v0 2012-07-19 23:41:58.000000000 -0400
+++ Makefile 2012-07-19 23:47:12.000000000 -0400
@@ -112,7 +112,7 @@
$(OBJECTS) xvid.ax.def \
-L$(DXTREE)/Lib -lstrmiids \
$(DXBASECLASSES)/strmbase.lib \
- -luuid -lwinmm -lole32 -loleaut32 -lcomctl32
-lstdc++
+ -luuid -lwinmm -lole32 -loleaut32 -lcomctl32
-lstdc++ -lgdi32
clean:
@echo " Cl: Object files and target lib"
As can be seen, I was then able to successfully build xvid.ax.
$ make DXTREE=/d/dx90/
L: xvid.ax
Creating library file: xvid.ax.a
Is this just due to changes in XviD and given my old tool chain or am I
just doing something wrong?
I am attaching a patch [xvid_120719.patch] with the above mods that allows
me to build in my environment.
Please let me know if you have any thoughts or if there is any further info
I can provide.
Thanks,
Brendan
More information about the Xvid-devel
mailing list