|
|||||||
This is a discussion on "Another problem.. with compiling this time" in the Top Mud Sites MUD Coding forum : 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 -... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
New Member
|
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. |
|
|
|
|
|
#2 |
|
Member
Join Date: Apr 2002
Posts: 122
![]() |
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.
|
|
|
|
|
|
#3 |
|
New Member
|
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 $ |
|
|
|
|
|
#4 |
|
Member
|
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. |
|
|
|
|
|
#5 |
|
New Member
|
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.... |
|
|
|
|
|
#6 |
|
Member
Join Date: Apr 2002
Posts: 122
![]() |
what kind of host system are you using?
|
|
|
|
|
|
#7 |
|
Member
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
![]() |
Maybe a stupid question, but what are your system specs?
Are you running Linux and if so, what Distro, or are you running Cygwin. |
|
|
|
|
|
#8 |
|
New Member
|
Im running Cygwin. The computer thats running it is a Intel P4 2.0 Ghz with a half gig of ram and 80 gb hd space. It has a cable internet connection too so the computer being able to run it isnt the case
|
|
|
|
|
|
#9 |
|
Member
|
Something odd in your linker, either due to a flaw in your Makefile or an inherent error in the linker itself. As others have said, what is your system (PC, SPARC, Alpha, Mac/RISC/etc), and what is your OS (Windows using Cygwin, Mac using Codewarrior, Linux using gcc (If so what version?
Post a copy of your Makefile, I still think there's an error in that. Most stock codebases come with different Makefiles for the various OS's. I'd be willing to bet that the Makefile you are using is not tailored to workw ith the OS/Compiler you are using, and is the root of the problem. Take a look in your directories for something like Makefile.win and Makefile.linux and Makefile.sun and so on, and COPY your current Makefile to a backup, then the appropriate one to "Makefile". If you've inherited the code from someone else, which it seems you have (or have moved it to a different OS/machine), then there's a good chacne the original Makefiles are no longer there. For some reason, one of the first things people do when "coding their game" is remove the other makefiles. Next they destroy the interoperability in the code by removing all the stuff that doesn't pertain to their OS.... (I did this too, so I'm not judging), then they start working on stuff. Anyhow, let us see the makefile. I think therein lies the crux of the problem. |
|
|
|
|
|
#10 |
|
Member
Join Date: Apr 2002
Posts: 122
![]() |
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).
|
|
|
|
|
|
#11 |
|
Member
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
![]() |
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 |
|
|
|
|
|
#12 |
|
New Member
|
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) $< |
|
|
|
|
|
#13 | |
|
Member
|
Quote:
Cygwin's just not smart enough to tell you that. Perhaps that's intentional.... |
|
|
|
|
|
|
#14 |
|
New Member
|
well heres the updated 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) $< and heres what i still get whenever i compile.. 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 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 act_wiz.o alias.o auction.o ban.o bit.o cmdedit.o comm.o const.o db.o db2.o e ects.o fight.o flags.o gedit.o handler.o healer.o hedit.o interp.o lookup.o ma c.o mem.o mob_cmds.o mob_prog.o music.o note.o olc.o olc_act.o olc_save.o skil .o pedit.o quest.o recycle.o remort.o save.o scan.o sedit.o skedit.o special.o tars.o string.o subway.o tables.o tablesave.o update.o whohtml.o make: *** [unholy] Error 1 |
|
|
|
|
|
#15 |
|
Member
|
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. |
|
|
|
|
|
#16 |
|
New Member
|
It says Makefile:18: *** Missing Separator. STOP.
|
|
|
|
|
|
#17 |
|
Member
Join Date: Apr 2002
Posts: 122
![]() |
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.
|
|
|
|
|
|
#18 | ||
|
Senior Member
|
Quote:
Quote:
|