Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Problems installing Allegro with DJGPP

This thread is locked; no one can reply to it. rss feed Print
Problems installing Allegro with DJGPP
Antoni Burguera
Member #2,484
June 2002

Some months ago I installed succesfully Allegro on my old desktop computer. Now I am trying to install it on my Toshiba laptop. I use Windows 98, but I want to use Allegro with DJGPP. I have succesfully installed DJGPP and set correctly the environment variables, but when I try to compile allegro, the following error message appears:

====================
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -Wall -Wno-unused -mcpu=pentium -O2 -funroll-loops ffast
math
-fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/allegro.o -c
src/allegr
o.c
In file included from include/allegro/base.h:26,
from include/allegro.h:27,
from src/allegro.c:23:
c:/djgpp/lib/gcc-lib/djgpp/3.1/include/stdarg.h:110: conflicting types for
`va_l
ist'
c:/djgpp/include/stdio.h:35: previous declaration of `va_list'
make.exe: *** [obj/djgpp/alleg/allegro.o] Error 1
====================

Does anyone know how can I solve this problem?

Thanks!

Rash
Member #2,374
May 2002
avatar

Matthew Leverton
Supreme Loser
January 1999
avatar

Rash, could you possibly create a simple HTML page that explains the problem and shows the fix in a step-by-step page. If you e-mail that to me, I could place it on Allegro.cc for easy reference. It's bound to keep coming up again & again.

I'd do it myself, but I don't have DJGPP or Windows 98.

Rash
Member #2,374
May 2002
avatar

Ok, I'm going to try to make this sound as simple as possible:

Go inside the main directory where you have installed DJGPP.
Then go inside the subdirectory named include.
Finally, go inside the subdirectory named sys.
Edit the file there named djtypes.h.
Find the following line (let's call this line 15, after its current position):

#define __DJ_va_list  typedef void *va_list;

Add the following before line 15:

#if __GNUC__>=3
#define __DJ_va_list    typedef __builtin_va_list va_list;
#else

Add the following after line 15:

#endif

Save the file. ::)

If anyone manages to not understand this, then you have my sympathy.

Matthew Leverton
Supreme Loser
January 1999
avatar

What version(s) of DJGPP/gcc does this affect? Is there an official upgrade available yet that fixes this issue?

Rash
Member #2,374
May 2002
avatar

The patch is necessary for GCC 3.1, but from the looks of the macro it seems to affect all 3.x versions, so Your Mileage May Vary(tm).
As far as DJGPP itself is concerned, that would be version 2.03. Hopefully, 2.04 will make this thing a non-issue.

Quote:

Is there an official upgrade available yet that fixes this issue?

You're looking at it.

Bruce Perry
Member #270
April 2000

My DJGPP, shipped with gcc 3.0.3, isn't affected.

Nice sig Rash ;D

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Go to: