Re: GNU C++ Compliant version of CircleMUD

From: Kenneth G. Cavness (kcavness@PROXICOM.COM)
Date: 09/15/97

>I'd like to see the fixes that you've done if that's possible....

Since it happened over several files, I'm pretty sure you wouldn't want
to see the changes -- even the diff files would be huge.


1. There are keywords in C++ that do not exist in C, and some of the
variables in structs.h and other files were conflicting. I suggest
you do a grep for the following keywords:

2. There are some cases where the .h files are "redeclared" -- a lot
of them, as a matter of fact. Around EVERY .h file that CircleMUD 3.0
has, place the following construct (replacing FILENAME with the real filename
or whatever you like):

            #ifndef _FILENAME_H_
            #define _FILENAME_H_

and at the end,

3. "const" has real meaning in C++, and remains throughout the program.
Thus, "extern" on "const" variables causes major problems. Either get
rid of the "extern" or get rid of the "const" where the linker tells you
there's a problem with a variable.

4. In the area where function pointers are placed in structs, the function
parameters were not included. Just have the function pointer declaration
include the correct parameter list. C++ uses stricter typing rules than C.

This is all I've done (other than, of course, changing gcc to g++ in the
Makefile :-)); anyone else who wants to can just do it by replacing gcc with
g++ in the makefile and starting a compile; you'll start getting the errors
and where they occur in the files very quickly.

Thanks for the interest,
Kenneth G. Cavness
Software Engineer
Proxicom, Inc.
>> From: Kenneth G. Cavness <kcavness@PROXICOM.COM>
>> To:
>> Subject:  GNU C++ Compliant version of CircleMUD
>> Date: Friday, September 05, 1997 2:30 PM
>>  I've developed a C++ compliant version of CircleMUD 3.0bpl11.
>> If anyone thinks this would be useful, I'll be happy to upload a copy
>> of the source to the ftp site.
>> All I've done is insure that it can compile. I've added no classes at
>> all; that would have to be done by the various implementors.
>> Changes:
>> 1. Renamed variables that conflicted with keywords (new, virtual, class,
>> and this)
>> 2. Fixed a couple of places where function pointers were passed without
>> correct parameter lists
>> 3. Removed some "const" declarations that were conflicting with
>> declarations.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST