Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!linus!raybed2!applicon!bambi!webb!webb From: webb@webb.UUCP Newsgroups: comp.lang.c++ Subject: C++ compiler problems Message-ID: <31900003@webb> Date: Wed, 23-Sep-87 16:03:00 EDT Article-I.D.: webb.31900003 Posted: Wed Sep 23 16:03:00 1987 Date-Received: Sun, 27-Sep-87 22:09:41 EDT Lines: 53 Nf-ID: #N:webb:31900003:000:1921 Nf-From: webb.applicon.UUCP!webb Sep 23 16:03:00 1987 We are running C++ 1.2.1. I am trying to compile OOPSLIB (a library of Smalltalk objects for C++, distributed by Keith E. Gorlen of The National Institutes of Health). I first have problems with the compiler complaining that it cannot tell an int from an unsigned int with the following code: overload MAX; inline int MAX(int a,int b) { return a >= b ? a : b; } inline long MAX(long a,long b) { return a >= b ? a : b; } inline float MAX(float a,float b) { return a >= b ? a : b; } inline double MAX(double a,double b) { return a >= b ? a : b; } inline unsigned int MAX(unsigned int a, unsigned int b) { return a >= b ? a : b; } When I comment out the last line that problem goes away, the compilation proceeds further, and I get the following error: "Arraychar.c", line 78: error: name _reader of type type name cannot be overloaded "Arraychar.c", line 78: error: bad base type: void Arraychar The offending line (#78) is: DEFINE_CLASS(Arraychar,Collection,1,NULL,NULL); and DEFINE_CLASS is #define'd as: #define DEFINE_CLASS(classname,basename,version,initor1,initor2)\ overload classname\ _reader;\ static void classname\ _reader(istream& strm, Object& where) { new classname(strm,*(classname*)&where)\; }\ static void classname\ _reader(fileDescTy& fd, Object& where) { new classname(fd,*(classname*)&where);\ }\ Class class_\ classname = Class( class_\ basename, "\ classname\ ", version, sizeof(classname),classname\ _reader, classname\ _reader, initor1, initor2);\ const Class* classname::isA() { return &class_\ classname; } I am not a C++ wizard, (I only dabble) but I need to get this package running. Anyone out there have any ideas? Anyone been able to get this package to run? Thanks for any help you can provide. Peter Webb. {allegra|decvax|harvard|yale|mirror}!ima!applicon!webb, {raybed2|spar|ulowell|sun}!applicon!webb, webb@applicon.com