[AD] Error compiling MinGW Allegro with Cygwin with w32api-3.8-1 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Allegro Conductors [AD]" <Alleg-developers@xxxxxxxxxx>
- Subject: [AD] Error compiling MinGW Allegro with Cygwin with w32api-3.8-1
- From: Andrei Ellman <ae-a-alleg@xxxxxxxxxx>
- Date: Tue, 19 Dec 2006 02:16:55 +0100
- Organization: Wacko Software
Hi,
I've discovered an issue when compiling MinGW Allegro 4.2.1 with Cygwin
with w32api-3.8-1 . If I downgrade to the w32api-3.7-1 package, the
error goes away. Note that in both cases, I installed dx80_mgw.zip after
I had installed the Cygwin package.
Here's the output for the offending compilation (note: All files up
until that point compiled just fine):
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2
-funroll
-loops -ffast-math -mno-cygwin -fomit-frame-pointer -I. -I./include -o
obj/mingw
32/alleg/wdsinput.o -c src/win/wdsinput.c
In file included from src/win/wdsinput.c:33:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/mmsystem.h:1570:
e
rror: parse error before "LPCWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/mmsystem.h:1591:
e
rror: parse error before "LPCWAVEFORMATEX"
In file included from src/win/wdsinput.c:34:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:350:
erro
r: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:356:
erro
r: parse error before '*' token
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:366:
erro
r: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:369:
erro
r: parse error before '*' token
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:417:
erro
r: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:426:
erro
r: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:433:
erro
r: parse error before '*' token
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:582:
erro
r: parse error before "LPCDSBUFFERDESC"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:687:
erro
r: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:692:
erro
r: parse error before "LPCDSBUFFERDESC"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:697:
erro
r: parse error before "LPCWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:1004:
err
or: parse error before "LPCDSCBUFFERDESC"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:1042:
err
or: parse error before "LPWAVEFORMATEX"
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/dsound.h:1044:
err
or: parse error before "LPCDSCBUFFERDESC"
src/win/wdsinput.c:54: error: parse error before "dsc_buf_wfx"
src/win/wdsinput.c:54: warning: type defaults to `int' in declaration of
`dsc_bu
f_wfx'
src/win/wdsinput.c:54: warning: data definition has no type or storage class
src/win/wdsinput.c:120: error: parse error before '*' token
src/win/wdsinput.c: In function `create_test_capture_buffer':
src/win/wdsinput.c:123: error: parse error before "dsc_trybuf_desc"
src/win/wdsinput.c:127: error: `dsc_trybuf_desc' undeclared (first use
in this f
unction)
src/win/wdsinput.c:127: error: (Each undeclared identifier is reported
only once
src/win/wdsinput.c:127: error: for each function it appears in.)
src/win/wdsinput.c:132: error: `wfx' undeclared (first use in this function)
src/win/wdsinput.c: At top level:
src/win/wdsinput.c:150: error: parse error before "WAVEFORMATEX"
src/win/wdsinput.c: In function `get_capture_format_support':
src/win/wdsinput.c:155: error: `WAVEFORMATEX' undeclared (first use in
this func
tion)
src/win/wdsinput.c:155: error: `test_wfx' undeclared (first use in this
function
)
src/win/wdsinput.c:190: error: `autodetect' undeclared (first use in
this functi
on)
src/win/wdsinput.c:194: error: `bits' undeclared (first use in this
function)
src/win/wdsinput.c:194: error: request for member `wBitsPerSample' in
something
not a structure or union
src/win/wdsinput.c:195: error: `stereo' undeclared (first use in this
function)
src/win/wdsinput.c:195: error: request for member `nChannels' in
something not a
structure or union
src/win/wdsinput.c:196: error: request for member `nChannels' in
something not a
structure or union
src/win/wdsinput.c:197: error: `rate' undeclared (first use in this
function)
src/win/wdsinput.c:197: error: request for member `nSamplesPerSec' in
something
not a structure or union
src/win/wdsinput.c:202: error: `wfx' undeclared (first use in this function)
src/win/wdsinput.c: In function `digi_directsound_capture_init':
src/win/wdsinput.c:269: error: `WAVEFORMATEX' undeclared (first use in
this func
tion)
src/win/wdsinput.c:269: error: parse error before "wfx"
src/win/wdsinput.c:311: error: `wfx' undeclared (first use in this function)
src/win/wdsinput.c: In function `digi_directsound_rec_cap_rate':
src/win/wdsinput.c:401: error: `WAVEFORMATEX' undeclared (first use in
this func
tion)
src/win/wdsinput.c:401: error: parse error before "wfx"
src/win/wdsinput.c:403: error: `wfx' undeclared (first use in this function)
src/win/wdsinput.c: In function `digi_directsound_rec_start':
src/win/wdsinput.c:452: error: parse error before "dscBufDesc"
src/win/wdsinput.c:465: error: request for member `wBitsPerSample' in
something
not a structure or union
src/win/wdsinput.c:466: error: request for member `nChannels' in
something not a
structure or union
src/win/wdsinput.c:469: error: `dscBufDesc' undeclared (first use in
this functi
on)
src/win/wdsinput.c:472: error: request for member `nAvgBytesPerSec' in
something
not a structure or union
make: *** [obj/mingw32/alleg/wdsinput.o] Error 1
I get the impression that mmsystem.h is the culprit. I did a diff
between the one from the 3.7.1 and 3.8.1 files, and this is what it came
up with:
194a194
> #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
1012c1013,1014
< #ifndef _WAVEFORMATEX_
---
> #ifndef _LPCWAVEFORMATEX_DEFINED
> #define _LPCWAVEFORMATEX_DEFINED
The changelog is at
http://cygwin.com/ml/cygwin-announce/2006-11/msg00039.html
I believe the relevant entry to be:
* include/mmsystem.h (_LPCWAVEFORMATEX_DEFINED): Define.
Use as guard for the WAVEFORMATEX structure instead of
_WAVEFORMATEX_ to avoid clashes with DirectSound. Keep
_WAVEFORMATEX_ for compatibility.
I'm not sure if this is a Cygwin or an Allegro related problem.
gcc -v produces the following:
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose
--prefix=/usr --
exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/lib --man
dir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,
java,objc --enable-nls --without-included-gettext
--enable-version-specific-runt
ime-libs --without-x --enable-libgcj --disable-java-awt
--with-system-zlib --ena
ble-interpreter --disable-libgcj-debug --enable-threads=posix
--enable-java-gc=b
oehm --disable-win32-registry --enable-sjlj-exceptions
--enable-hash-synchroniza
tion --enable-libstdcxx-debug : (reconfigured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
AE.