1 |
directx 9.0 software development kit update (summer 2003) |
directx 9.0 software development kit update (summer 2003) |
2 |
gnu c compiler compatiblity patch |
gnu c compiler compatibility patch |
3 |
=============================================== |
=============================================== |
4 |
|
|
5 |
this patch has been tested with: |
this patch has been tested with: |
6 |
gcc v3.2.3 |
gcc v3.2.3 |
7 |
gcc v3.3.3 |
gcc v3.3.3 |
8 |
|
gcc v3.4.1 (linux->win32 cross compiler) |
9 |
msc v6.0 + sp5 + pp |
msc v6.0 + sp5 + pp |
10 |
|
|
11 |
to apply patch |
I) Applying the patch |
12 |
-------------- |
------------------ |
13 |
1. install the directx sdk update to /c/DX90SDK |
|
14 |
|
1. Install the directx sdk update to /c/DX90SDK (to match default |
15 |
|
Makefile variable values) or to any other dir. From now on, the |
16 |
|
sdk install directory will be called ${SDKDIR}. |
17 |
|
|
18 |
dx90updatesdk.exe |
dx90updatesdk.exe |
19 |
size: 190,991,976 bytes |
size: 190,991,976 bytes |
20 |
md5: ed328da4033e18124801265ee91f690e |
md5: ed328da4033e18124801265ee91f690e |
21 |
|
|
22 |
2. cd /c/DX90SDK |
2. cd ${SDKDIR} |
23 |
3. patch -p0 < dx90sdk-update-gcc.patch |
3. patch -p0 --dry-run < /path/to/dx90sdk-update-gcc.patch |
24 |
|
(if all goes well, no rejects... else read the special notes) |
25 |
|
patch -p0 < /path/to/dx90sdk-update-gcc.patch |
26 |
|
|
27 |
|
|
28 |
|
-- |
29 |
|
Special notes for cross compilation on GNU/Linux systems (or any |
30 |
|
supported platform for wine): |
31 |
|
- You can install the DX SDK using the wine win32 API emulation |
32 |
|
layer. The unzipping stage of the install will succeed, it's |
33 |
|
all that is required to continue. So don't panic if the install |
34 |
|
program breaks/crashes after the self unzip did succeed. |
35 |
|
- Then depending on your cvs program, you may require to unix'ify |
36 |
|
the endlines of all sources in the SDK before applying the patch. |
37 |
|
That can be required CVS uses to expand/replace endlines according |
38 |
|
to the host platform type, so it's very likely that if you do |
39 |
|
extract the xvidcore sources from a windows box, this step isn't |
40 |
|
mandatory, but if you're using a unix box (even cygwin), you may |
41 |
|
be obliged to proceed with: |
42 |
|
find ${SDKDIR} -name "*.cpp" -exec dos2unix {} \; |
43 |
|
find ${SDKDIR} -name "*.h" -exec dos2unix {} \; |
44 |
|
|
45 |
|
II) building strmbase.lib |
46 |
|
------------------------- |
47 |
|
|
48 |
|
1. cd ${SDKDIR}/Samples/C++/Directshow/BaseClasses |
49 |
|
2. make |
50 |
|
(this should output strmbase.lib) |
51 |
|
|
52 |
|
-- |
53 |
|
Special notes for people cross compiling, or people who installed |
54 |
|
the SDK elsewhere than /c/DX90SDK: |
55 |
|
- you can overide Makefile defaults in the make command line, |
56 |
|
just use something like this command line (adapt according to |
57 |
|
your build environment): |
58 |
|
make \ |
59 |
|
CXX=/opt/mingw32-cross/bin/i386-mingw32-g++ \ |
60 |
|
RANLIB=/opt/mingw32-cross/bin/i386-mingw32-ranlib \ |
61 |
|
DXTREE=${SDKDIR} |
62 |
|
|
63 |
|
|
64 |
to build strmbase |
III) Building your own apps |
65 |
----------------- |
--------------------------- |
|
1. cd /c/DX90SDK/Samples/C++/Directshow/BaseClasses |
|
|
2. make (this will output strmbase.lib) |
|
66 |
|
|
67 |
|
These variables should be defined in your Makefiles: |
68 |
|
|
69 |
to build your own apps |
DXTREE=${SDKTREE} |
|
---------------------- |
|
|
DXTREE=/c/DX90SDK |
|
70 |
DXBASECLASSES=$(DXTREE)/Samples/C++/DirectShow/BaseClasses |
DXBASECLASSES=$(DXTREE)/Samples/C++/DirectShow/BaseClasses |
71 |
CXXFLAGS += -DRELEASE \ |
CXXFLAGS += -DRELEASE \ |
72 |
-I$(DXTREE)/Include \ |
-I$(DXTREE)/Include \ |
76 |
$(DXBASECLASSES)/strmbase.lib \ |
$(DXBASECLASSES)/strmbase.lib \ |
77 |
-lole32 -loleaut32 -lstdc++ |
-lole32 -loleaut32 -lstdc++ |
78 |
|
|
79 |
|
So it's now time to build the XviD Dshow filter (the xvidcore |
80 |
|
source dir is supposed to be ${xvidcore}): |
81 |
|
|
82 |
|
1. cd ${xvidcore}/dshow |
83 |
|
2. make |
84 |
|
(should output a xvid.ax file in a =build dir by default) |
85 |
|
|
86 |
|
-- |
87 |
|
Notes for people using a cross compiler, or people who did install |
88 |
|
the SDK elsewhere than /c/DX90SDK: |
89 |
|
- you can overide Makefile variables from the make command line, |
90 |
|
a fairly complete command could look like this, adapt to your |
91 |
|
build environment: |
92 |
|
make \ |
93 |
|
CC=/opt/mingw32-cross/bin/i386-mingw32-gcc \ |
94 |
|
CXX=/opt/mingw32-cross/bin/i386-mingw32-g++ \ |
95 |
|
WINDRES=/opt/mingw32-cross/bin/i386-mingw32-windres \ |
96 |
|
DXTREE=/mnt/data/windows/dx9sdk |
97 |
|
|
98 |
|
NB: with some win32-api headers from mingw.org, you may suffer |
99 |
|
multiple QACONTAINERFLAGS definitions. In that case you need |
100 |
|
to manually edit ${mingw_install}/include/ocidl.h; Search for |
101 |
|
QACONTAINERFLAGS. It should look like this: |
102 |
|
|
103 |
|
enum tagQACONTAINERFLAGS |
104 |
|
{ |
105 |
|
... |
106 |
|
} QACONTAINERFLAGS; |
107 |
|
|
108 |
|
Then change this to that: |
109 |
|
|
110 |
|
typedef enum tagQACONTAINERFLAGS |
111 |
|
{ |
112 |
|
... |
113 |
|
} QACONTAINERFLAGS; |
114 |
|
|
115 |
|
Noticed the additional typedef ? that's the point ! |