So a few years back, this used to compile cleanly and with no issues. Now that I am trying to boot it up again, it is giving me an error, and it seems to be due to the compiler version. Any help would be appreciated.
The difference is that in the makefile….
#CC = gcc CC = gcc-4.3.4 <—– I had to change this to 4.4 PROF = -O -g
With this changed, when it gets close to compiling it all cleanly, I get
string.c:634: error: conflicting types for getline /usr/include/stdio.h:671: note: previous declaration of getline was here make[1]: *** [o/string.o] Error 1
So lines 634-635 in string.c are…
char *getline (char *str, char *buf) {
I'm rusty at this coding thing, so I can't seem to figure out what is wrong. Any help would be appreciated.
There's an builtin function called getline. You'll have to change the definition to something like rom_getline() and then grep the .c files for calls, and change their calls also to rom_getline() so you don't accidentally call the builtin.
Uh…where do I change the definition of that? lol. Sorry. More exactly, what exactly am I changing? The getline portion to rom_getline is all the .c files?
Woah. I changed the getline to rom_getline in string.c, tried the compile again..and it worked. Let's see if it boots…
It will boot. But you should look for other calls to getline. Do a grep in your src directory for "getline". I'm thinking they're all in string.c so you should be good just to change the calls in string.c from getline to rom_getline.
Maybe you can help me with this….if I have to be in the area folder, but start the mud from the src folder, there is a command to do t hat right? Because I have to be in the area folder to start it…but the startup file is in src. I can't remember how to do that..
i think stock releases have it so you boot the mud from the areas directory…. startup is generally in the areas directory too!!
25 Apr, 2015, quixadhal wrote in the 10th comment:
Votes: 0
You need to be "in" the area directory because most Dikurivatives assume the pathnames of all the data files are rooted from the current working directory. So, they try to load "area.lst" instead of "areas/area.lst" or "../area.lst" or "/home/foo/mud/area.lst".
@quixadhal I see. Do you know if that was a silly choice on the part of the original developer (Diku) or if it came later?
My DikuMUD alfa was like that, although we called them "zones", and there wasn't any list. It just loaded wld/tinyworld.zon and so forth. One of the very first changes I did was to make the path relative so you could be in any subdirectory, not just the world file one. It would, of course, be better to have it search around for them, or push all that crud into a database and stop worrying about files. :)
The difference is that in the makefile….
#CC = gcc
CC = gcc-4.3.4 <—– I had to change this to 4.4
PROF = -O -g
With this changed, when it gets close to compiling it all cleanly, I get
string.c:634: error: conflicting types for getline
/usr/include/stdio.h:671: note: previous declaration of getline was here
make[1]: *** [o/string.o] Error 1
So lines 634-635 in string.c are…
char *getline (char *str, char *buf)
{
I'm rusty at this coding thing, so I can't seem to figure out what is wrong. Any help would be appreciated.