Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » problem compiling allegro

This thread is locked; no one can reply to it. rss feed Print
problem compiling allegro
zed2000
Member #8,344
February 2007

i have a little problem with the compiling of allegro: (the text is very long)

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\allegro>fix mingw
Configuring Allegro for Windows/MinGW...
Done!
C:\allegro>make
Compiling Allegro for MinGW32, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll
-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wd
sinput.o -c src/win/wdsinput.c
In file included from src/win/wdsinput.c:33:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h:1570: error
: syntax error before "LPCWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h:1591: error
: syntax error before "LPCWAVEFORMATEX"
In file included from src/win/wdsinput.c:34:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:350: error: s
yntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:356: error: s
yntax error before '*' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:366: error: s
yntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:369: error: s
yntax error before '*' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:417: error: s
yntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:426: error: s
yntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:433: error: s
yntax error before '*' token
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:582: error: s
yntax error before "LPCDSBUFFERDESC"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:687: error: s
yntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:692: error: s
yntax error before "LPCDSBUFFERDESC"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:697: error: s
yntax error before "LPCWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:1004: error:
syntax error before "LPCDSCBUFFERDESC"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:1042: error:
syntax error before "LPWAVEFORMATEX"
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dsound.h:1044: error:
syntax error before "LPCDSCBUFFERDESC"
src/win/wdsinput.c:54: error: syntax 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: syntax error before '*' token
src/win/wdsinput.c: In function `create_test_capture_buffer':
src/win/wdsinput.c:123: error: syntax 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: syntax 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: syntax 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: syntax 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: syntax 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

Matthew Leverton
Supreme Loser
January 1999
avatar

You need to install the DX library for MinGW, available at http://alleg.sf.net.

Edit: or it might be this: http://sourceforge.net/mailarchive/message.php?msg_id=37718184

Also, make sure you are using Allegro 4.2.1.

Rampage
Member #3,035
December 2002
avatar

Did you configure your MINGDIR environment variable?

-R

zed2000
Member #8,344
February 2007

i use allegro 421, and a mingw compiler 3.4.2
i have already copied the two files (dt. "ordner") from dx80_mgw.zip into c:\MinGW
(there i have installed the compiler)

edit:
i typed into "path" this:";C:\MinGW\bin;c:\mingw"

Milan Mimica
Member #3,877
September 2003
avatar

zed2000
Member #8,344
February 2007

so what should i change? (sorry i dont understand the text from http://sourceforge.net/mailarchive/message.php?msg_id=37718184 very properly)

Milan Mimica
Member #3,877
September 2003
avatar

Remove:

/* already defined... */
#ifndef _LPCWAVEFORMATEX_DEFINED
#define _LPCWAVEFORMATEX_DEFINED
#endif

from include/allegro/platform/almngw32.h

zed2000
Member #8,344
February 2007

thank you for help.
i have fixed the problem. i have installed dev-cpp, run "make" from dev-cpp ( !not from MinGW) and allegro was installed.

Go to: