Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Compiling the server ➜ Help me! Please!

Help me! Please!

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Syrus   (2 posts)  Bio
Date Mon 13 Mar 2006 07:35 AM (UTC)
Message
Here's the deal. Running rom24b6 with olc already implemented. I downloaded the latest version of lope's colour code and patched. Hit make and was presented with this -

**********************************************************

$ make
gcc -c -Wall -O -g -DOLD_RAND -DNO_CRYPT comm.c
comm.c: In function `main':
comm.c:422: warning: implicit declaration of function `close'
comm.c: In function `read_from_descriptor':
comm.c:1104: warning: implicit declaration of function `read'
comm.c: In function `write_to_descriptor':
comm.c:1592: warning: implicit declaration of function `write'
comm.c: In function `nanny':
comm.c:1713: warning: implicit declaration of function `crypt'
comm.c:1713: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
comm.c:1825: warning: assignment makes pointer from integer without a cast
comm.c:1848: warning: passing arg 1 of `strcmp' makes pointer from integer witho
ut a cast
comm.c: At top level:
comm.c:2433: error: redefinition of 'page_to_char'
comm.c:2409: error: previous definition of 'page_to_char' was here
make: *** [comm.o] Error 1

***********************************************************

Any help is greatly appreciated.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Mon 13 Mar 2006 07:37 AM (UTC)
Message
Looks like you have the function page_to_char defined twice. Is this the case? Have you looked at the lines in question and checked to see if you have the function twice? If so why do you have it twice? Which one is the 'correct' one -- supposedly the one you got with the snippet? Then just remove the old one.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Syrus   (2 posts)  Bio
Date Reply #2 on Mon 13 Mar 2006 07:52 AM (UTC)
Message
Yessiry :) I got that problem fixed up, thanks. Heres another :P

***********************************************************
$ make
rm -f rom
gcc -O -g -o rom act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz
.o alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o handler.o h
ealer.o interp.o note.o lookup.o magic.o magic2.o music.o recycle.o save.o scan.
o skills.o special.o tables.o update.o string.o mem.o bit.o olc.o olc_act.o olc_
save.o -lcrypt
act_comm.o: In function `do_delet':
/home/Saint/rom24/src/act_comm.c:47: undefined reference to `_send_to_char'
act_comm.o: In function `do_delete':
/home/Saint/rom24/src/act_comm.c:61: undefined reference to `_send_to_char'
/home/Saint/rom24/src/act_comm.c:78: undefined reference to `_send_to_char'
/home/Saint/rom24/src/act_comm.c:82: undefined reference to `_send_to_char'
/home/Saint/rom24/src/act_comm.c:83: undefined reference to `_send_to_char'
act_comm.o:/home/Saint/rom24/src/act_comm.c:84: more undefined references to `_s
end_to_char' follow
collect2: ld returned 1 exit status
make: *** [rom] Error 1
***********************************************************
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #3 on Mon 13 Mar 2006 11:00 AM (UTC)
Message

/home/Saint/rom24/src/act_comm.c:47: undefined reference to `_send_to_char'


An undefined reference is where the compiler cannot find the function that is being called from that line of code, in this case its _send_to_char.

Now, this can be caused by a number of things, TYPO, missing library, missing header include are prolly the most common.

send_to_char is a function in rom, so my question is, does the code you have added require you to add in a new function _send_to_char, if it dosnt then i think you could safly remove the preceading underscore and it will compile fine.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Mon 13 Mar 2006 05:43 PM (UTC)
Message
Sometimes the compilers add in that underscore, so the missing function might actually be send_to_char. Did you rename that page_to_char or something?

Just what did you do when applying this patch? Could you show us the patch? It looks like you did something fairly strange... :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


17,496 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.