[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Compiling the server
. . -> [Subject]  Rom 2.4 and GCC4
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Rom 2.4 and GCC4

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


Posted by Samson   USA  (683 posts)  [Biography] bio
Date Sun 08 May 2005 08:07 PM (UTC)
Message
This one seems simple enough - not sure why they chose to just up and change it but they did. In tables.h, at the top end of the file you have this set of declarations:


/* game tables */
extern	const	struct	clan_type	clan_table[MAX_CLAN];
extern	const	struct	position_type	position_table[];
extern	const	struct	sex_type	sex_table[];
extern	const	struct	size_type	size_table[];

/* flag tables */
extern	const	struct	flag_type	act_flags[];
extern	const	struct	flag_type	plr_flags[];
extern	const	struct	flag_type	affect_flags[];
extern	const	struct	flag_type	off_flags[];
extern	const	struct	flag_type	imm_flags[];
extern	const	struct	flag_type	form_flags[];
extern	const	struct	flag_type	part_flags[];
extern	const	struct	flag_type	comm_flags[];
extern	const	struct	flag_type	extra_flags[];
extern	const	struct	flag_type	wear_flags[];
extern	const	struct	flag_type	weapon_flags[];
extern	const	struct	flag_type	container_flags[];
extern	const	struct	flag_type	portal_flags[];
extern	const	struct	flag_type	room_flags[];
extern	const	struct	flag_type	exit_flags[];


These need to all be moved down to the end of the file, past the last struct that's defined here. Once you've moved them, all is well and your code will once again compile.

SmaugMuds.org: http://www.smaugmuds.org - The Smaug MUDs Community Center

"The past was erased, the erasure was forgotten, the lie became truth." -- George Orwell, 1984
[Go to top] top

Posted by Christopher Palmer   (2 posts)  [Biography] bio
Date Reply #1 on Wed 13 Feb 2008 10:13 PM (UTC)

Amended on Thu 14 Feb 2008 01:07 AM (UTC) by Nick Gammon

Message
I fixed this problem, as told above, only to get more errors.

[root@localhost src]# make
gcc -c -Wall -O -g act_comm.c
gcc -c -Wall -O -g act_enter.c
gcc -c -Wall -O -g act_info.c
act_info.c: In function 'do_look':
act_info.c:1161: warning: suggest explicit braces to avoid ambiguous 'else'
act_info.c:1170: warning: suggest explicit braces to avoid ambiguous 'else'
gcc -c -Wall -O -g act_move.c
gcc -c -Wall -O -g act_obj.c
act_obj.c: In function 'do_put':
act_obj.c:424: warning: suggest explicit braces to avoid ambiguous 'else'
act_obj.c:462: warning: suggest explicit braces to avoid ambiguous 'else'
act_obj.c: In function 'get_cost':
act_obj.c:2481: warning: suggest explicit braces to avoid ambiguous 'else'
gcc -c -Wall -O -g act_wiz.c
gcc -c -Wall -O -g alias.c
gcc -c -Wall -O -g ban.c
gcc -c -Wall -O -g comm.c
comm.c:184: error: conflicting types for 'read'
/usr/include/unistd.h:327: error: previous declaration of 'read' was here
comm.c:188: error: conflicting types for 'write'
/usr/include/unistd.h:333: error: previous declaration of 'write' was here
comm.c: In function 'turn_on_mxp':
comm.c:445: warning: pointer targets in passing argument 2 of 'write_to_buffer' differ in signedness
comm.c: In function 'init_descriptor':
comm.c:934: warning: pointer targets in passing argument 3 of 'getsockname' differ in signedness
comm.c:935: warning: pointer targets in passing argument 3 of 'accept' differ in signedness
comm.c:965: warning: pointer targets in passing argument 3 of 'getpeername' differ in signedness
comm.c: In function 'read_from_buffer':
comm.c:1189: warning: pointer targets in assignment differ in signedness
comm.c:1192: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1196: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1196: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1196: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1199: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1203: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1203: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c:1203: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
comm.c: In function 'nanny':
comm.c:1877: warning: pointer targets in passing argument 2 of 'write_to_buffer' differ in signedness
make: *** [comm.o] Error 1

what should I do now?
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #2 on Thu 14 Feb 2008 12:51 AM (UTC)

Amended on Thu 14 Feb 2008 01:08 AM (UTC) by Nick Gammon

Message
These are the errors:
comm.c:184: error: conflicting types for 'read'
/usr/include/unistd.h:327: error: previous declaration of 'read' was here
comm.c:188: error: conflicting types for 'write'
/usr/include/unistd.h:333: error: previous declaration of 'write' was here


Can you show us those lines?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 14 Feb 2008 01:07 AM (UTC)
Message
‘ and ’ in your original posts are just Unicode for opening and closing quotes, I have taken the liberty of replacing those to make the errors more readable.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Thu 14 Feb 2008 01:09 AM (UTC)
Message
Personally I wouldn't compile as root, too many chances of things going wrong.

Is this Linux or Cygwin?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


6,045 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]