www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/09/21:06:12

Date: Wed, 9 Oct 1996 20:52:12 -0400 (EDT)
From: James Flemer <flemer AT panther DOT middlebury DOT edu>
To: djgpp mailing list <djgpp AT delorie DOT com>
Subject: Error using allegro. (maybe)
Message-Id: <Pine.A32.3.95.961009204855.14563A-100000@panther.middlebury.edu>
Mime-Version: 1.0

I wrote a small little program that uses Allegro (v2.1), but I
am getting errors in 'allegro.h' when I compile. I trimmed the
program way down and the error still occurs. I unziped the original
'allegro.h' to make sure it had not been changed. One module of the
program (the 'do_exit' function) compiles (to '.o') fine and also 
includes 'allegro.h'. I have included all the info I thought relavant
(and some that probably is not :-) ). I have tried to compile from
RHIDE, DOS7, and a Win95-Dosbox, with the same result.
*Note: I have '+LFN=y'; I do not think this matters in my case and
have read the faq concerning it. None of the filenames/paths
are > 8.3 chars.

Is this my fault/error or is it an error in 'allegro.h' or DJGPP?

- James Flemer
<flemer AT panther DOT middlebury DOT edu>

--- computer specs ---
486dx2-66
8mb ram
CWSDPMI V0.90+ (r3) (only used in DOS7 [no GUI])
win95 v4.00.950a

--- foo.c ---
#include "foo.h"  /* has prototype for 'do_exit' and defines TRUE/FALSE (if undefined) */
#include <stdio.h>
#include <allegro.h>

#ifndef VERSION
float version = 1.00;
#endif
#ifdef VERSION
float version = (float) VERSION;
#endif

int main ( int argc, char **argv )
{
allegro_init();
if ( ( set_gfx_mode ( GFX_AUTODETECT , 640 , 480 , 0 , 0 ) ) < 0 )
	do_exit ( (char *) "Unable to set VESA 640x480 mode." , 0 );
exit ( 0 );
}

--- gcc command ---
C:\Source\SHAD>gcc -v -Wall -o foo.o -c foo.c

--- gcc output  ---
Reading specs from c:/gnu/contrib/rsxntdj/lib\specs
gcc version 2.7.2
 c:/gnu/bin\cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di
386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=0 -D__unix__ -D__i386__ -D__GO32__ -D
__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=0 -D__unix -D__i386 -D__GO32 -D__MSDOS
 -D__DJGPP=2 -D__DJGPP_MINOR=0 -Wall foo.c /t\ccbaaaaa
GNU CPP version 2.7.2 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/gnu/include
 c:/gnu/contrib/rsxntdj/include
 c:/gnu/contrib/allegro
 /usr/local/include
 /usr/local/go32/include
 /usr/local/lib/gcc-lib/go32/2.7.2/include
 /usr/include
End of search list.
 c:/gnu/bin\cc1.exe /t\ccbaaaaa -fno-strength-reduce -quiet -dumpbase foo.c -Wal
l -version -o /t\cccaaaaa
GNU C version 2.7.2 (80386, BSD syntax) compiled by GNU C version 2.7.2.
c:/gnu/contrib/allegro/allegro.h: In function `stretch_sprite':
In file included from foo.c:3:
c:/gnu/contrib/allegro/allegro.h:613: parse error before `='
c:/gnu/contrib/allegro/allegro.h: In function `stretch_blit':
c:/gnu/contrib/allegro/allegro.h:619: parse error before `='

--- go32-v2 output (from Win95-dosbox) --- 
go32/v2 version 2.0 built Jan 23 1996 22:03:02
Usage: go32 coff-image [args]
Rename this to go32.exe only if you need a go32 that can run v2 binaries as
 well as v1 binaries (old makefiles).  Put ahead of the old go32 in your PATH.
DPMI memory available: 4404 Kb
DPMI swap space available: 3276 Kb

--- djgpp.env ---
DJDIR=c:/gnu

+USER=dosuser
+TMPDIR=/t
+EMU387=%DJDIR%/bin/emu387.dxe
+LFN=y

[cpp]
CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/contrib/rsxntdj/include;%DJDIR%/contrib/allegro
OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc
OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

[gcc]
COMPILER_PATH=%/>;COMPILER_PATH%;%DJDIR%/bin
LIBRARY_PATH=%DJDIR%/contrib/rsxntdj/lib;%/>;LIBRARY_PATH%;%DJDIR%/lib;%DJDIR%/contrib/allegro
------------------

- JAMES FLEMER
  <flemer AT panther DOT middlebury DOT edu>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019