ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/14/19:03:04

Date: Tue, 14 Feb 1995 15:11:34 -0800 (PST)
From: Gordon Hogenson <ghogenso AT u DOT washington DOT edu>
To: "Saleh M. Jamil" <jamil10 AT buffnet DOT net>
Cc: djgpp mailing list <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: compiling djgpp contrib sources

On Fri, 10 Feb 1995, Saleh M. Jamil wrote:

> Hello,
> 
> I have been trying to compile the contrib source files that were installed
> with djgpp.  I tried to compile the sblaster, windows, and windows test 
> source files with djgpp's make, but I am allways getting errors.  
>                  from inc/w.h:20,
>                  from src/basewin.cc:17:
> inc/aecc.h:61: declaration of C function `int atexit(void (*)(...))' conflicts with
> e:/djgpp/include/djgppstd.h:63: previous declaration `int atexit(void (*)())' here
> inc/aecc.h:61: conflicting types for `int atexit(void (*)(...))'
> e:/djgpp/include/djgppstd.h:63: previous declaration as `int atexit(void (*)())'
> inc/attrmap.h: In method `void attribmap::setmap(unsigned char *, int = MAPSIZE)':
> In file included from inc/w.h:27,
>                  from src/basewin.cc:17:
> inc/attrmap.h:36: call of overloaded `min' is ambiguous
> inc/aedef.h:79: candidates are: min(short int, short int)
> inc/aedef.h:76:                 min(long int, long int)
> Segmentation violation in pointer 0x00000405 at d8:50544

I fixed these by (a) commenting out the declaration of atexit in
aecc.h:61, and (b) using a macro for min:  ( I tried with templates,
but this is much messier than it at first appears ).

#define min(a,b) ((a) < (b) ? (a) : (b) )

(actually I used the GNU min operator, <?, which I think is nifty).

You may have to make other changes, too.  I had problems with libg++
in combination with aewindows, because aewindows defines OK as 0, which
causes problems with most of the libg++ classes, which have an OK()
member function which suddenly is " 0 () ".

Gordon Hogenson


- Raw text -


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