Finally, after a long time since I formatted my HDD, I'm trying to build allegro, and it doesn't seem to work. I downloaded Allegro 4.2.1 source and the dx70min it requires, and it still does not want to work.
I never had similar problems with allegro, it always compiled just fine.
1 | gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll |
2 | -loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/gd |
3 | i.o -c src/win/gdi.c |
4 | gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll |
5 | -loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wd |
6 | daccel.o -c src/win/wddaccel.c |
7 | In file included from src/win/wddaccel.c:25: |
8 | src/win/wddraw.h:33:22: ddraw.h: No such file or directory |
9 | In file included from src/win/wddaccel.c:25: |
10 | src/win/wddraw.h:43: error: syntax error before "LPDIRECTDRAWSURFACE2" |
11 | src/win/wddraw.h:43: warning: no semicolon at end of struct or union |
12 | src/win/wddraw.h:49: error: syntax error before '}' token |
13 | src/win/wddraw.h:49: warning: type defaults to `int' in declaration of `DDRAW_SU |
14 | RFACE' |
15 | src/win/wddraw.h:49: warning: data definition has no type or storage class |
16 | src/win/wddraw.h:63: error: syntax error before "directdraw" |
17 | src/win/wddraw.h:63: warning: type defaults to `int' in declaration of `directdr |
18 | aw' |
19 | src/win/wddraw.h:63: warning: data definition has no type or storage class |
20 | src/win/wddraw.h:64: error: syntax error before "ddclipper" |
21 | src/win/wddraw.h:64: warning: type defaults to `int' in declaration of `ddclippe |
22 | r' |
23 | src/win/wddraw.h:64: warning: data definition has no type or storage class |
24 | src/win/wddraw.h:65: error: syntax error before "ddpalette" |
25 | src/win/wddraw.h:65: warning: type defaults to `int' in declaration of `ddpalett |
26 | e' |
27 | src/win/wddraw.h:65: warning: data definition has no type or storage class |
28 | src/win/wddraw.h:66: error: syntax error before "ddpixel_format" |
29 | src/win/wddraw.h:66: warning: type defaults to `int' in declaration of `ddpixel_ |
30 | format' |
31 | src/win/wddraw.h:66: warning: data definition has no type or storage class |
32 | src/win/wddraw.h:67: error: syntax error before "ddcaps" |
33 | src/win/wddraw.h:67: warning: type defaults to `int' in declaration of `ddcaps' |
34 | src/win/wddraw.h:67: warning: data definition has no type or storage class |
35 | src/win/wddraw.h:69: error: syntax error before '*' token |
36 | src/win/wddraw.h:69: warning: type defaults to `int' in declaration of `gfx_dire |
37 | ctx_primary_surface' |
38 | src/win/wddraw.h:69: warning: data definition has no type or storage class |
39 | src/win/wddraw.h:98: error: syntax error before '*' token |
40 | src/win/wddraw.h:115: error: syntax error before '*' token |
41 | src/win/wddraw.h:134: error: syntax error before '*' token |
42 | src/win/wddraw.h:134: error: syntax error before "LPDDPIXELFORMAT" |
43 | src/win/wddraw.h:134: warning: type defaults to `int' in declaration of `gfx_dir |
44 | ectx_create_surface' |
45 | src/win/wddraw.h:134: warning: data definition has no type or storage class |
46 | src/win/wddraw.h:135: error: syntax error before '*' token |
47 | src/win/wddraw.h:136: error: syntax error before '*' token |
48 | src/win/wddraw.h:140: error: syntax error before '*' token |
49 | src/win/wddraw.h:141: error: syntax error before '*' token |
50 | src/win/wddaccel.c: In function `ddraw_blit_to_self': |
51 | src/win/wddaccel.c:72: warning: implicit declaration of function `IDirectDrawSur |
52 | face2_BltFast' |
53 | src/win/wddaccel.c:72: error: syntax error before ')' token |
54 | src/win/wddaccel.c:73: error: syntax error before ')' token |
55 | src/win/wddaccel.c:74: error: `DDBLTFAST_WAIT' undeclared (first use in this fun |
56 | ction) |
57 | src/win/wddaccel.c:74: error: (Each undeclared identifier is reported only once |
58 | src/win/wddaccel.c:74: error: for each function it appears in.) |
59 | src/win/wddaccel.c: In function `ddraw_masked_blit': |
60 | src/win/wddaccel.c:94: error: `DDCOLORKEY' undeclared (first use in this functio |
61 | n) |
62 | src/win/wddaccel.c:94: error: syntax error before "src_key" |
63 | src/win/wddaccel.c:109: error: `src_key' undeclared (first use in this function) |
64 | |
65 | src/win/wddaccel.c:127: warning: implicit declaration of function `IDirectDrawSu |
66 | rface2_SetColorKey' |
67 | src/win/wddaccel.c:127: error: syntax error before ')' token |
68 | src/win/wddaccel.c:128: error: `DDCKEY_SRCBLT' undeclared (first use in this fun |
69 | ction) |
70 | src/win/wddaccel.c:130: warning: implicit declaration of function `IDirectDrawSu |
71 | rface2_Blt' |
72 | src/win/wddaccel.c:130: error: syntax error before ')' token |
73 | src/win/wddaccel.c:131: error: syntax error before ')' token |
74 | src/win/wddaccel.c:132: error: `DDBLT_KEYSRC' undeclared (first use in this func |
75 | tion) |
76 | src/win/wddaccel.c:132: error: `DDBLT_WAIT' undeclared (first use in this functi |
77 | on) |
78 | src/win/wddaccel.c: In function `ddraw_do_stretch_blit': |
79 | src/win/wddaccel.c:205: error: `DDCOLORKEY' undeclared (first use in this functi |
80 | on) |
81 | src/win/wddaccel.c:205: error: syntax error before "src_key" |
82 | src/win/wddaccel.c:220: error: `src_key' undeclared (first use in this function) |
83 | |
84 | src/win/wddaccel.c:240: error: syntax error before ')' token |
85 | src/win/wddaccel.c:241: error: `DDCKEY_SRCBLT' undeclared (first use in this fun |
86 | ction) |
87 | src/win/wddaccel.c:243: error: syntax error before ')' token |
88 | src/win/wddaccel.c:244: error: syntax error before ')' token |
89 | src/win/wddaccel.c:245: error: `DDBLT_KEYSRC' undeclared (first use in this func |
90 | tion) |
91 | src/win/wddaccel.c:245: error: `DDBLT_WAIT' undeclared (first use in this functi |
92 | on) |
93 | src/win/wddaccel.c: In function `ddraw_clear_to_color': |
94 | src/win/wddaccel.c:270: error: `DDBLTFX' undeclared (first use in this function) |
95 | |
96 | src/win/wddaccel.c:270: error: syntax error before "blt_fx" |
97 | src/win/wddaccel.c:284: error: `blt_fx' undeclared (first use in this function) |
98 | src/win/wddaccel.c:291: error: syntax error before ')' token |
99 | src/win/wddaccel.c:292: error: `DDBLT_COLORFILL' undeclared (first use in this f |
100 | unction) |
101 | src/win/wddaccel.c:292: error: `DDBLT_WAIT' undeclared (first use in this functi |
102 | on) |
103 | src/win/wddaccel.c: In function `ddraw_rectfill': |
104 | src/win/wddaccel.c:312: error: `DDBLTFX' undeclared (first use in this function) |
105 | |
106 | src/win/wddaccel.c:312: error: syntax error before "blt_fx" |
107 | src/win/wddaccel.c:363: error: `blt_fx' undeclared (first use in this function) |
108 | src/win/wddaccel.c:370: error: syntax error before ')' token |
109 | src/win/wddaccel.c:371: error: `DDBLT_COLORFILL' undeclared (first use in this f |
110 | unction) |
111 | src/win/wddaccel.c:371: error: `DDBLT_WAIT' undeclared (first use in this functi |
112 | on) |
113 | src/win/wddaccel.c: In function `ddraw_hline': |
114 | src/win/wddaccel.c:391: error: `DDBLTFX' undeclared (first use in this function) |
115 | |
116 | src/win/wddaccel.c:391: error: syntax error before "blt_fx" |
117 | src/win/wddaccel.c:430: error: `blt_fx' undeclared (first use in this function) |
118 | src/win/wddaccel.c:437: error: syntax error before ')' token |
119 | src/win/wddaccel.c:438: error: `DDBLT_COLORFILL' undeclared (first use in this f |
120 | unction) |
121 | src/win/wddaccel.c:438: error: `DDBLT_WAIT' undeclared (first use in this functi |
122 | on) |
123 | src/win/wddaccel.c: In function `ddraw_vline': |
124 | src/win/wddaccel.c:457: error: `DDBLTFX' undeclared (first use in this function) |
125 | |
126 | src/win/wddaccel.c:457: error: syntax error before "blt_fx" |
127 | src/win/wddaccel.c:496: error: `blt_fx' undeclared (first use in this function) |
128 | src/win/wddaccel.c:503: error: syntax error before ')' token |
129 | src/win/wddaccel.c:504: error: `DDBLT_COLORFILL' undeclared (first use in this f |
130 | unction) |
131 | src/win/wddaccel.c:504: error: `DDBLT_WAIT' undeclared (first use in this functi |
132 | on) |
133 | src/win/wddaccel.c: In function `gfx_directx_enable_acceleration': |
134 | src/win/wddaccel.c:531: error: request for member `dwCaps' in something not a st |
135 | ructure or union |
136 | src/win/wddaccel.c:531: error: `DDCAPS_BLT' undeclared (first use in this functi |
137 | on) |
138 | src/win/wddaccel.c:538: error: request for member `dwCaps' in something not a st |
139 | ructure or union |
140 | src/win/wddaccel.c:538: error: `DDCAPS_BLTSTRETCH' undeclared (first use in this |
141 | function) |
142 | src/win/wddaccel.c:547: error: request for member `dwCaps' in something not a st |
143 | ructure or union |
144 | src/win/wddaccel.c:547: error: `DDCAPS_BLTCOLORFILL' undeclared (first use in th |
145 | is function) |
146 | src/win/wddaccel.c:557: error: request for member `dwCaps' in something not a st |
147 | ructure or union |
148 | src/win/wddaccel.c:557: error: `DDCAPS_COLORKEY' undeclared (first use in this f |
149 | unction) |
150 | src/win/wddaccel.c:558: error: request for member `dwCKeyCaps' in something not |
151 | a structure or union |
152 | src/win/wddaccel.c:558: error: `DDCKEYCAPS_SRCBLT' undeclared (first use in this |
153 | function) |
154 | src/win/wddaccel.c:562: error: request for member `dwCaps' in something not a st |
155 | ructure or union |
156 | src/win/wddaccel.c: In function `gfx_directx_enable_triple_buffering': |
157 | src/win/wddaccel.c:584: warning: implicit declaration of function `IDirectDrawSu |
158 | rface2_GetFlipStatus' |
159 | src/win/wddaccel.c:584: error: syntax error before ')' token |
160 | src/win/wddaccel.c:584: error: `DDGFS_ISFLIPDONE' undeclared (first use in this |
161 | function) |
162 | src/win/wddaccel.c:585: error: `DD_OK' undeclared (first use in this function) |
163 | src/win/wddaccel.c:585: error: `DDERR_WASSTILLDRAWING' undeclared (first use in |
164 | this function) |
165 | make: *** [obj/mingw32/alleg/wddaccel.o] Error 1 |
]]>
Recheck that you unpacked the DirectX headers to the right place. If you did, try dx80min instead and see if it makes a difference.
]]>I copied the include and lib folders to allegro's main folder, and it doesn't work. Neither does dx80_min.
]]>They go in your compiler's directory, not Allegro's.
]]>Ok, I've copied them to my compiler's directory, but it still doesn't work. Gives the same errors as before.
]]>src/win/wddraw.h:33:22: ddraw.h: No such file or directory
That means you have not copied the files into the compiler's include folder.
]]>I have. It produces a lot of errors anyway.
1 | C:\Documents and Settings\Lechu\Pulpit\allegro-4.2-dev-2006-06-21>make |
2 | Compiling Allegro for MinGW32, optimised. Please wait... |
3 | gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll |
4 | -loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wd |
5 | sinput.o -c src/win/wdsinput.c |
6 | In file included from src/win/wdsinput.c:33: |
7 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h:1570: error |
8 | : syntax error before "LPCWAVEFORMATEX" |
9 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h:1591: error |
10 | : syntax error before "LPCWAVEFORMATEX" |
11 | In file included from src/win/wdsinput.c:34: |
12 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:128: error: s |
13 | yntax error before "LPWAVEFORMATEX" |
14 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:134: error: s |
15 | yntax error before '*' token |
16 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:142: error: s |
17 | yntax error before "LPWAVEFORMATEX" |
18 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:145: error: s |
19 | yntax error before '*' token |
20 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:193: error: s |
21 | yntax error before "LPWAVEFORMATEX" |
22 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:196: error: s |
23 | yntax error before '*' token |
24 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:284: error: s |
25 | yntax error before "LPCDSBUFFERDESC" |
26 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:337: error: s |
27 | yntax error before "LPWAVEFORMATEX" |
28 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:342: error: s |
29 | yntax error before "LPCDSBUFFERDESC" |
30 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:346: error: s |
31 | yntax error before "LPCWAVEFORMATEX" |
32 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:569: error: s |
33 | yntax error before "LPCDSCBUFFERDESC" |
34 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:607: error: s |
35 | yntax error before "LPWAVEFORMATEX" |
36 | d:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:609: error: s |
37 | yntax error before "LPCDSCBUFFERDESC" |
38 | src/win/wdsinput.c:54: error: syntax error before "dsc_buf_wfx" |
39 | src/win/wdsinput.c:54: warning: type defaults to `int' in declaration of `dsc_bu |
40 | f_wfx' |
41 | src/win/wdsinput.c:54: warning: data definition has no type or storage class |
42 | src/win/wdsinput.c:120: error: syntax error before '*' token |
43 | src/win/wdsinput.c: In function `create_test_capture_buffer': |
44 | src/win/wdsinput.c:123: error: syntax error before "dsc_trybuf_desc" |
45 | src/win/wdsinput.c:127: error: `dsc_trybuf_desc' undeclared (first use in this f |
46 | unction) |
47 | src/win/wdsinput.c:127: error: (Each undeclared identifier is reported only once |
48 | |
49 | src/win/wdsinput.c:127: error: for each function it appears in.) |
50 | src/win/wdsinput.c:132: error: `wfx' undeclared (first use in this function) |
51 | src/win/wdsinput.c: At top level: |
52 | src/win/wdsinput.c:150: error: syntax error before "WAVEFORMATEX" |
53 | src/win/wdsinput.c: In function `get_capture_format_support': |
54 | src/win/wdsinput.c:155: error: `WAVEFORMATEX' undeclared (first use in this func |
55 | tion) |
56 | src/win/wdsinput.c:155: error: `test_wfx' undeclared (first use in this function |
57 | ) |
58 | src/win/wdsinput.c:190: error: `autodetect' undeclared (first use in this functi |
59 | on) |
60 | src/win/wdsinput.c:194: error: `bits' undeclared (first use in this function) |
61 | src/win/wdsinput.c:194: error: request for member `wBitsPerSample' in something |
62 | not a structure or union |
63 | src/win/wdsinput.c:195: error: `stereo' undeclared (first use in this function) |
64 | src/win/wdsinput.c:195: error: request for member `nChannels' in something not a |
65 | structure or union |
66 | src/win/wdsinput.c:196: error: request for member `nChannels' in something not a |
67 | structure or union |
68 | src/win/wdsinput.c:197: error: `rate' undeclared (first use in this function) |
69 | src/win/wdsinput.c:197: error: request for member `nSamplesPerSec' in something |
70 | not a structure or union |
71 | src/win/wdsinput.c:202: error: `wfx' undeclared (first use in this function) |
72 | src/win/wdsinput.c: In function `digi_directsound_capture_init': |
73 | src/win/wdsinput.c:269: error: `WAVEFORMATEX' undeclared (first use in this func |
74 | tion) |
75 | src/win/wdsinput.c:269: error: syntax error before "wfx" |
76 | src/win/wdsinput.c:311: error: `wfx' undeclared (first use in this function) |
77 | src/win/wdsinput.c: In function `digi_directsound_rec_cap_rate': |
78 | src/win/wdsinput.c:401: error: `WAVEFORMATEX' undeclared (first use in this func |
79 | tion) |
80 | src/win/wdsinput.c:401: error: syntax error before "wfx" |
81 | src/win/wdsinput.c:403: error: `wfx' undeclared (first use in this function) |
82 | src/win/wdsinput.c: In function `digi_directsound_rec_start': |
83 | src/win/wdsinput.c:452: error: syntax error before "dscBufDesc" |
84 | src/win/wdsinput.c:465: error: request for member `wBitsPerSample' in something |
85 | not a structure or union |
86 | src/win/wdsinput.c:466: error: request for member `nChannels' in something not a |
87 | structure or union |
88 | src/win/wdsinput.c:469: error: `dscBufDesc' undeclared (first use in this functi |
89 | on) |
90 | src/win/wdsinput.c:472: error: request for member `nAvgBytesPerSec' in something |
91 | not a structure or union |
92 | make: *** [obj/mingw32/alleg/wdsinput.o] Error 1 |
]]>
It's a known problem between Allegro 4.2.1 and the latest MinGW WinAPI package.
Edit allegro/include/allegro/platform/almngw32.h and remove the following lines:
#ifndef _LPCWAVEFORMATEX_DEFINED #define _LPCWAVEFORMATEX_DEFINED #endif
It's fixed in SVN, so 4.2.2 should work out of the box when it's released*.
* in a couple of years. ;)
]]>Thanks a lot, it works now
]]>