delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/08/21:06:30

From: "fox" <puffycheetos AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro Example 22 Errors.
Date: Fri, 8 Dec 2000 19:49:04 -0600
Organization: BrightNet OKlahoma UseNet Server
Lines: 55
Message-ID: <90s322$i1g$1@sooner.brightok.net>
NNTP-Posting-Host: ada2p71.cld.brightok.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Can anyone help me figure out this error?

C:\djgpp\ALLEGRO\EXAMPLES>gpp ex22.c
ex22.c: In function `int main()':
ex22.c:454: no match for `++{anonymous enum} &'

this is from the ex22.c example in the allegro\examples folder.


Line 454 says :

450      if (keypressed()) {
451  if ((readkey() & 0xFF) == 27)
452     break;
453  else {
454     ++render_mode;
455     if (render_mode >= last_mode)
456        render_mode = wireframe;
457   }
458     }
459   }


I am assuming it has something to do with enumeration but I haven't been
able to put my finger on the problem.

I have tried compiling it with gcc, and also by including the -lalleg option
for both gcc and gpp, still I am
unable to figure this out.


This is the part about enumeration if this helps any

79 enum

80   wireframe,
81   flat,
82   gcol,
83   grgb,
84   atex,
85   ptex,
86   atex_mask,
87   ptex_mask,
88   atex_lit,
89   ptex_lit,
90   atex_mask_lit,
91   ptex_mask_lit,
92   last_mode
93 } render_mode = wireframe;

Thanks,

fox


- Raw text -


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