Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Compiling allegro with dev-c++ 4

This thread is locked; no one can reply to it. rss feed Print
Compiling allegro with dev-c++ 4
Frank Garrett
Member #1,625
November 2001
avatar

Hey, guys i was looking at the last post here
and i'm kinda having the same troubles over here. I
really hate to bring up this 3 mounth topic but this
stuff is driving me insane. Alright i'll tell you every
thing i done so far from the beganing to the end.

November 12, 2001 Time : 2: 14 pm
I went to http://www.bloodshed.net/devcpp.html
and got the latest version of dev-c++ version 4.
Ok on that very page 42 lines down you will
find a topic that say Dev-c++ 4 downloads
. Under there its a url called dev-c++ resour-
ces page (libraries, sources, updates...) right,
so i go there. On the left hand side theres the
main menu. Under Packages/Libraries
i wen't to getting dev-c++ packages.
And got the latest Directx v8 for mingw32 by
Paul Gerfen at http://www.gamecoding.co.uk/
also got every single thing that was on that page.
For the allegro story i already had it for about
three weeks now its allegro 3939 win ready.
Now finaly, finish downloading everything the
size came up to be 14.21 megabytes. I install
dev-c++ first. Then i exract allegro in to its dir-
ectory, and after that before i try compiling any
thing i open up my msconfig and set the dir-
SET PATH=C:\DEV-CPP\BIN;%PATH%
SET MINGDIR=C:\DEV-CPP
After that i restarted my machine, went to
the dos prompt and typed cd\allegro
follow by make -v and gcc -v. Every thing
went fine so far so the next step was to
compile allegro so i typed as follow
SET DEBUGMODE=1
MAKE
It compiled for a while then gave these errors?
C:\Allegro>make
Compiling Allegro for MINGW32, Optimised.
Please Wait...
gcc -DALLEGRO_SRC -Wall -Who_unused -mcpu=
pentium -02 - funroll -loops -ffast-math -fomit-frame-pointer
-fno-strength-reduce -I. -I./include -o obj/mingw32/alleg
/wddaccel.o -c src/win/wddaccel.c
In file included form src\win\wddraw.h,30.
form src/win/wddaccel.c:23;
C:\DEV-CPP\BIN\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..
\..\include\ddraw.h:153: parse error before 'HMONITOR'
C:\DEV-CPP\BIN\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..
\..\include\ddraw.h:154: parse error before 'HMONITOR'
C:\DEV-CPP\BIN\MAKE.EXE: ***[obj/mingw32/alleg/
waddaccel.o] Error 1
Well basicly after that it ends there, can someone
please help me and thankyou!!
[ November 12, 2001: Message edited by: Frankie ]

Bob
Free Market Evangelist
September 2000
avatar

--
- Bob
[ -- All my signature links are 404 -- ]

Frank Garrett
Member #1,625
November 2001
avatar

I was first stun to see allegro compile
amazingly perfect then after that wow
well i'll be darn.... It works man you are
good!! I don't know how you done it but it
really works. I ran the excolmap.c demo and
results->
Total errors: 0
Size of out put file: 8192
Aldemo demo compiled successfully!
Thankz BOB.. i really aperciate it!!
[ November 12, 2001: Message edited by: Frankie ]

Josh Bolduc
Member #251
April 2000
avatar

Hehe... I got those HMONITOR errors as well a couple of days ago. I was about to post here to ask what was wrong, but before doing that I re-tried the whole thing. It turned out that I said:
fix.bat mingw
on the first try, instead of
fix.bat mingw32
That's all I did different. The first try simply responded, 'done', so I assumed everything was okay. In other words, I simply didn't have the allegro source prepared for mingw32... was that similar to what you did wrong?
However, I still have a different question. I built both the static linked allegro and the dynamic. The problem is that when I try to compile using the static libs, I get many linker errors. I'm using Dev-c++ and the latest allegro wip. I add the static lib to the project and I define ALLEGRO_STATICLINK before I include allegro.h. Is there anything else I need to do? Here's the messages:
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x103):wsndwo.c: undefined reference to `waveOutPause@4'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x139):wsndwo.c: undefined reference to `waveOutGetPosition@12'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x34a):wsndwo.c: undefined reference to `waveOutOpen@24'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x395):wsndwo.c: undefined reference to `waveOutPrepareHeader@12'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x3b6):wsndwo.c: undefined reference to `waveOutWrite@12'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x43d):wsndwo.c: undefined reference to `waveOutGetVolume@8'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x48d):wsndwo.c: undefined reference to `waveOutReset@4'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x4a1):wsndwo.c: undefined reference to `waveOutSetVolume@8'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x4b7):wsndwo.c: undefined reference to `waveOutUnprepareHeader@12'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x4c8):wsndwo.c: undefined reference to `waveOutClose@4'
C:\devcpp\Lib\liballeg_s.a(wsndwo.o)(.text+0x541):wsndwo.c: undefined reference to `waveOutSetVolume@8'
C:\devcpp\Lib\liballeg_s.a(wdsndmix.o)(.text+0x3cc):wdsndmix.c: undefined reference to `DirectSoundCreate@12'
C:\devcpp\Lib\liballeg_s.a(wdsndmix.o)(.text+0x475):wdsndmix.c: undefined reference to `DirectSoundCreate@12'
C:\devcpp\Lib\liballeg_s.a(wddraw.o)(.text+0x2d0):wddraw.c: undefined reference to `DirectDrawCreate@12'
C:\devcpp\Lib\liballeg_s.a(wddraw.o)(.text+0x308):wddraw.c: undefined reference to `IID_IDirectDraw2'
C:\devcpp\Lib\liballeg_s.a(wddbmp.o)(.text+0x14):wddbmp.c: undefined reference to `IID_IDirectDrawSurface2'
I'm new to all this fancy smancy windoze compilin' an all, so any help is appreciated. I don't have to use static linking, I just thought I'd try it and compare executable sizes and stuff.
Thanks,
/jb

Specter Phoenix
Member #1,425
July 2001
avatar

From my experience with that type of error I think that you need to update something, but I'm not sure on what. Everytime I've gotten an error similiar to that I was told by Bob or someone else that it was because I had to update something like the library or something like that. I'm not 100% sure though as to whether that is what you have to do or not.

Justin_W
Member #655
September 2000
avatar

You don't need to #define ALLEGRO_STATIC_LINK in your source file. You do have to link the right things into your project. Go to the Project menu, select Project Options, and in the text box for "Further object files or linker options" write:
-lalleg_s -lgdi32 -ldxguid -lole32 -ldinput -lddraw -lwinmm -ldsound
And for the "extra compiler options" text box, write:
-DALLEGRO_STATICLINK
That should do it for ya.
[ November 13, 2001: Message edited by: Justin_W ]

Josh Bolduc
Member #251
April 2000
avatar

Sweet! Thanks much!

/jb

Go to: