I worked out that other stuff, and got it down - which is cool. ^.^ Thanks for the help. I have run into a new problem though. I just patched a global_boards patch onto the MUD, and did the necessary changes the MUD said. Though when I did, I get error messages like;
comm.o(.text+0x5d43): In function 'nanny':
/smaug/dist/src/comm.c:2474: undefined reference to '_handle_con_note_to'
comm.o(.text+0x5d49): In function 'nanny':
/smaug/dist/src/comm.c:2478: undefined reference to '_handle_con_note_subject'
etc. It continues, having undefined refernece errors with '_handle_con_expire_', '_handle_con_text', '_handle_con_finish.
So yeah.. Basically, I wana know - what does undefined reference mean? I have defined all the commands (I am pretty sure) in MUD.h as well as in Tables.C and everything. Any clues?
That means that your linker is not actually finding the function definition for the function in question.
This usually happens if, for example, you have:
[code]
extern int i;
int main()
{
printf("%d", i);
return 0;
}
[/code]
On its own, this will create an undefined reference error, because the compiler will not know where "i" is stored. However, since it's declared as an extern, the compiler will not produce a syntax/language error.
If you had to add a .c file with new functions in it, make sure you add it to your makefile.
I would say that since they have _con_ in the errors, it means that you may have missed adding the connection states to the list in mud.h . These states are used by nanny to decide what to display, normal game text, log in stuff, or, in your case, the note console. Look into that, hope it helps. 'Course I can't see your code, so I can't be certain.
Hmm.. How do I add the new .c file to the makefile? I did add a new C file in there - I just assumed that the 'make' command just incorporated it automatically. So yeah, how do I do it?
Use vi on 'makefile' in your src directory. You should see a list of .o files and .c files - or something like that. Actually it should be fairly clear where you need to add it... just stick it in the list. If you still have doubts just paste the first part of your makefile and I'll tell you from there. :)
Ohhh ok, you're using Cygwin. Then use your normal text editor or whatever you use to open up the source files. 'vi' is a very common/popular text editor on Unix-based systems.
You want to look for something like:
[code]
O_FILES = act_comm.o act_info.o act_obj.o \
a whole bunch of .o files
[/code]
Find that, that's where you stick in (your .c file).o according to the format shown in the file. Basically take off .c and put on .o instead.
I use Microsoft Visual C++ to open the src files and edit them etc. Okay, what i did was do a big word find and found the appropiate file. (Makefile.Unix), and found all the .o's and .c files, as well as the .h files. What I did was, add in board.o, board.c and board.h (as there was one). Yet, I compile with Cygwin and it still doesn't recognis it. Whats the deal..?