Date: Tue, 14 Feb 1995 15:11:34 -0800 (PST) From: Gordon Hogenson To: "Saleh M. Jamil" Cc: djgpp mailing list 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,