Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Another problem.. with compiling this time (http://www.topmudsites.com/forums/showthread.php?t=507)

Shadow 07-06-2002 07:31 PM

Here is a exact copy of my compiling. I've asked a couple of my coding buddies and they have no clue whats wrong.

gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_comm.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_enter.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_info.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_move.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_obj.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND act_wiz.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND alias.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND auction.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND ban.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND bit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND cmdedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND comm.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND const.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND db.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND db2.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND effects.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND fight.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND flags.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND gedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND handler.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND healer.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND hedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND interp.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND lookup.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND magic.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND mem.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND mob_cmds.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND mob_prog.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND music.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND note.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND olc.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND olc_act.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND olc_save.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND skills.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND pedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND quest.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND recycle.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND remort.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND save.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND scan.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND sedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND skedit.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND special.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND stars.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND string.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND subway.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND tables.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND tablesave.c
gcc -c -Wall -O -g -ggdb  -Dunix -Dlinux -DNOCRYPT -DOLD_RAND update.c
make: *** [update.o] Error 1

My coding friend asked if i had the file open, which i dont. He asked if update.c was actually there, it is.  If anyone could help it would be GREATLY appreciated.  My AIM is kev92486 if you would rather directly talk to me.

thelenian 07-06-2002 08:24 PM

Try just entering "gcc -c -Wall -O -g -ggdb -Dunix -Dlinux -DNOCRYPT -DOLD_RAND update.c" while in the same dir as update.c and posting what kind of error messages you get.

Shadow 07-06-2002 08:31 PM

It just goes to the next line. No error message.

Owner@KEVS ~/src3
$ gcc -c -Wall -O -g -ggdb -Dunix -Dlinux -DNOCRYPT -DOLD_RAND update.c <-- this line is me typing it in

Owner@KEVS ~/src3
$

Robbert 07-06-2002 09:41 PM

Try doing make again now, it appears you didn't get any error report when you manually compiled it (that's what you did by typing in that line).

If there were a problem with the file itself, the compiler would have bailed on you during manual entry as well.

I'm betting something quirky is up with your Makefile. Open it up and take a look at it. Look specifically for something around the name 'update.o' - either no trailing slash after it, and more stuff to be compiled on the next line, or something else equally funky.

If you don't find anything immediately obvious, try to post it on here, verbatim. What system are you using? Typ 'gcc --version ' to check the version you have. I know there were some major problems with 3.0x when it first came out, and with 2.96 awhile back when it was new (Redhat still uses 2.96 I think, which was not an official gcc release).

If when you do 'make' again it moves to the next file, or tries to link them, or anything else, let us know what happens. The more info you can provide, the better.

Shadow 07-06-2002 11:45 PM

Well, i sent all the code to my one friend. He uses linux OS, and he said it compiles fine for him. He sent me the updated code, and heres what it gets to now.

I cut the stuff above tablesave.c It compiles fine before that, just did this to save space

gcc -c -Wall -O -g -ggdb -Dunix -Dlinux -DNOCRYPT -DOLD_RAND tablesave.c
gcc -c -Wall -O -g -ggdb -Dunix -Dlinux -DNOCRYPT -DOLD_RAND update.c
gcc -c -Wall -O -g -ggdb -Dunix -Dlinux -DNOCRYPT -DOLD_RAND whohtml.c
rm -f unholy
gcc -O -g -ggdb -o unholy act_comm.o act_enter.o act_info.o act_move.o act_obj.o
act_wiz.o alias.o auction.o ban.o bit.o cmdedit.o comm.o const.o db.o db2.o eff
ects.o fight.o flags.o gedit.o handler.o healer.o hedit.o interp.o lookup.o magi
c.o mem.o mob_cmds.o mob_prog.o music.o note.o olc.o olc_act.o olc_save.o skills
.o pedit.o quest.o recycle.o remort.o save.o scan.o sedit.o skedit.o special.o s
tars.o string.o subway.o tables.o tablesave.o update.o whohtml.o
make: *** [unholy] Error 1

Still not sure what the problem is. Dont know what to do now to check whats wrong since it has to do with making the actual exe....

thelenian 07-06-2002 11:57 PM

what kind of host system are you using?

Ogma 07-06-2002 11:59 PM

Maybe a stupid question, but what are your system specs?
Are you running Linux and if so, what Distro, or are you running Cygwin.

Shadow 07-07-2002 12:07 AM


Robbert 07-07-2002 12:11 AM


thelenian 07-07-2002 12:11 AM

Aha... that'd be your problem. The Makefile is configured for a linux box. Try to find a version of whatever codebase it is that you're trying to compile that's configured for generic UNIX or specifically for Cygwin (Cygwin is a UNIX emulator, not a GNU/Linux emulator).

Ogma 07-07-2002 12:12 AM

Didn't it strike you as maybe a little odd that your running Cygwin on a Windoze system and you're telling the compiler that you're running Linux?

Sheesh

Shadow 07-07-2002 12:17 AM

I am running cygwin version 2.249.2.5 (dunno thats the setup exe version) off of Windows XP. Heres the makefile:

CC = gcc
PROF = -O -g -ggdb
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -Dunix -Dlinux -DNOCRYPT -DOLD_RAND
L_FLAGS = $(PROF)

O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
alias.o auction.o ban.o bit.o cmdedit.o comm.o const.o db.o db2.o \
effects.o fight.o flags.o gedit.o handler.o healer.o hedit.o interp.o \
lookup.o magic.o mem.o mob_cmds.o mob_prog.o music.o note.o \
olc.o olc_act.o olc_save.o skills.o pedit.o quest.o recycle.o remort.o \
save.o scan.o sedit.o skedit.o special.o stars.o string.o subway.o \
tables.o tablesave.o update.o whohtml.o \


unholy: $(O_FILES)
rm -f unholy
$(CC) $(L_FLAGS) -o unholy $(O_FILES) $(LIBS)

.c.o: unholy.h
$(CC) -c $(C_FLAGS) $<

Robbert 07-07-2002 12:55 AM

Remove the trailing \ after "whohtml.o" and it should compile fine. You're teling the compiler with that slash that you have other files to add before linking, but then not listing them.

Cygwin's just not smart enough to tell you that.

Perhaps that's intentional....

Shadow 07-07-2002 01:00 AM


Robbert 07-07-2002 01:24 AM

Try this:
[code] CC = gcc
PROF =
DEBUG = -g
O_FLAGS = -O
C_FLAGS = -Wall $(PROF) $(DEBUG) $(NOCRYPT) -DNOCRYPT -DOLD_RAND
L_FLAGS = $(O_FLAGS) $(PROF)

O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
alias.o auction.o ban.o bit.o cmdedit.o comm.o const.o db.o db2.o \
effects.o fight.o flags.o gedit.o handler.o healer.o hedit.o interp.o \
lookup.o magic.o mem.o mob_cmds.o mob_prog.o music.o note.o \
olc.o olc_act.o olc_save.o skills.o pedit.o quest.o recycle.o remort.o \
save.o scan.o sedit.o skedit.o special.o stars.o string.o subway.o \
tables.o tablesave.o update.o whohtml.o


unholy; $(O_FILES)
rm -f unholy
$(CC) $(L_FLAGS) -o unholy $(O_FILES)

.c.o; unholy.h
$(CC) -c $(C_FLAGS) -DNOCRYPT -Dunix $<
[/quote]

I did some changes to it, based on deduction on how Cygwin operates - I've never used it, so can't be sure. I don't remember if Cygwin does profiling or not, so I've removed the profiling flags, and put the debug back in their own tag like they should be. I'm not positive, but I think the other problem with yours was the inclusion of $(LIBS) in the makefile, with no libraries defined - it may be that they are included in the Cygwin system somewhere or something else of which I'm not aware. I modelled my modified makefile off of one from a Cygwin makefile, and am making a -lot- of assumptions on how the whole thing operates. Anyhow, try that and see if it's any better.

Shadow 07-07-2002 01:29 AM


thelenian 07-07-2002 01:44 AM

The only thing that I can see in there that might be causing a problem is the -Dlinux, which causes the preprocessor to include some linux-specific code. Try taking that out of the original Makefile and compiling again.

Yui Unifex 07-07-2002 09:07 AM

You forgot the tab:

Every line underneath a rule definition and dependency list must begin with a tab.

Shadow 07-07-2002 11:51 PM


thelenian 07-08-2002 12:03 AM

Maybe you had one of the buggy vers of GCC (i.e. 2.96 or 3.0x)


All times are GMT -4. The time now is 01:54 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022