12 Apr, 2009, erdrick wrote in the 1st comment:
Votes: 0
I have a rom-based MU* running off my pc at the moment, using Cygwin as the base when I code/run/compile it. I am in no right a coder, I know enough to get me by, to make small tiny changes. I've tried getting the code onto a real shell/provider, and when I try to compile I always get the same error.


ability.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

I have no idea why it does that, never run into it before.

It lists gcc as the compile in the make file.
12 Apr, 2009, Remcon wrote in the 2nd comment:
Votes: 0
Sounds like you have the format of the file in something that your host can't understand. I would make sure the file format is in Unix. If you don't know how to convert it try out EditPad Lite, you can open the file and then have it convert the format to Unix for you.
12 Apr, 2009, erdrick wrote in the 3rd comment:
Votes: 0
Tried your suggestion, whenever I opened ability.o to convert it, all I get is a bunch of weird symbols. I would convert it to unix, I sent it to the shell and tried to compile again, same result. This is part of my makefile, don't know if somethingh ere may be causing it.

CC = gcc
PROF = -O -g
NOCRYPT =
C_FLAGS = -Wall $(PROF) $(NOCRYPT) -DNOCRYPT
L_FLAGS = $(PROF) -DNOCRYPT

O_FILES = ability.o \
act_combat.o \
act_comm.o \
act_info.o \
act_move.o \
act_obj.o \
act_wiz.o \
alias.o \
automap.o \
ban.o \
bit.o \
board.o \
check.o \
ffto: $(O_FILES)
# @echo "."
@echo "Compiling the world of Ivalice!"
rm -f ffto
$(CC) $(L_FLAGS) -o ffto $(O_FILES)
@echo "Ivalice has been updated."
12 Apr, 2009, Remcon wrote in the 4th comment:
Votes: 0
You have to open ability.c and convert it and maybe the rest of the files also. Granted this isn't a problem I have ran into either, but making sure they are in UNIX format is the first thing I would do here lol. The .o files are made from the .c files by the compiler unless I'm just wrong about how your Makefile is setup lol :)
12 Apr, 2009, erdrick wrote in the 5th comment:
Votes: 0
It actually worked when I converted it to windows, but now it says missing element or something lol. Woe is me, I'll figure something out.
12 Apr, 2009, Remcon wrote in the 6th comment:
Votes: 0
lol what OS are you compiling it on?
12 Apr, 2009, erdrick wrote in the 7th comment:
Votes: 0
I'm on Windows XP, but I'm using a shell from mcp. I think if i can find the right compiler, I can make it compile. gcc-3.4 and gcc-3.6 didn't work.
12 Apr, 2009, David Haley wrote in the 8th comment:
Votes: 0
In general you can't compile files on one system, move them to another host running a different OS/architecture, and have things work. You need to 'make clean', or just delete all .o files and the executable, and re-compile.
12 Apr, 2009, erdrick wrote in the 9th comment:
Votes: 0
Hrm..the make clean option actually did something, and gave me 2 errors, It's looking like I will be forced to run it off my pc and Cygwin, here's to hoping I don't burn my pc by leaving it on 24/7 to run the game. Heh. Thanks for all the answers!
12 Apr, 2009, Davion wrote in the 10th comment:
Votes: 0
erdrick said:
Hrm..the make clean option actually did something, and gave me 2 errors, It's looking like I will be forced to run it off my pc and Cygwin, here's to hoping I don't burn my pc by leaving it on 24/7 to run the game. Heh. Thanks for all the answers!


It's arguably healthier for a PC to run non-stop. I have a few PC's in my house, and none of them ever go off. It should be just fine as long as it has proper cooling.
12 Apr, 2009, Guest wrote in the 11th comment:
Votes: 0
Davion said:
It's arguably healthier for a PC to run non-stop. I have a few PC's in my house, and none of them ever go off. It should be just fine as long as it has proper cooling.


Provided you live somewhere where electricity is billed at sane rates. Unlike California.
13 Apr, 2009, JohnnyStarr wrote in the 12th comment:
Votes: 0
I used to do the same thing with Cygwin and upload it to my shell
and bang my head trying to figure out why it didn't work, David is right
about deleting the .o files, but if you are getting more errors i hate to
break it to you, but what are you planning on doing when your mud bombs? :surprised:

I bring this up just because trying to be an admin without learning the
programming side would not just be a nightmare, but it would be impossible.
If you can take the time to learn C, you will save hours of headaches and
angry players. :lol:
13 Apr, 2009, Sharmair wrote in the 13th comment:
Votes: 0
erdrick said:
Hrm..the make clean option actually did something, and gave me 2 errors, It's looking like I will be forced to run it off my pc and Cygwin, here's to hoping I don't burn my pc by leaving it on 24/7 to run the game. Heh. Thanks for all the answers!

Ok, it was an easy fix to get it to do the local compile (deleting the platform specific intermediate files),
maybe it will not be too hard to fix the errors to get it running. Why don't you post the errors here and
see if we can help you instead of giving up just yet? After all, that is what these forums are for (one
thing anyway).
14 Apr, 2009, erdrick wrote in the 14th comment:
Votes: 0
Well, basically it's only one error that I got, not two, didn't see it correctly the first time. I am slowly learning to be able to make changes and code on my own, but it's a rather slow process, any assistance you guys can give would be appreciated.

This is the error:

gcc -c -Wall -O -g -DNOCRYPT ability.c
In file included from ability.c:17:
ability.h:3: error: array type has incomplete element type
make: *** [ability.o] Error 1

These are the lines it says:
ability.c 17

#include "ability.h"

ability.h

extern const struct ability_table ability_data[];
14 Apr, 2009, David Haley wrote in the 15th comment:
Votes: 0
Make sure that whatever .h file that defines struct ability table (mud.h? you can use grep to find it) is included in ability.c before ability.h is included. This is somewhat easier that having header files include each other since you don't have any risk of circular includes (which are not hard to solve, but still).
14 Apr, 2009, erdrick wrote in the 16th comment:
Votes: 0
Ability.h is the last one mentioned in the ability.c file.
14 Apr, 2009, David Haley wrote in the 17th comment:
Votes: 0
So, you need to find what .h file defines the relevant structure. It's probably mud.h, but you would check by running grep:

grep "text to search for" *.c *.h

will search for "text to search for" in all .c and .h files.

Then, you would #include mud.h at the top of ability.c, before ability.h.
14 Apr, 2009, erdrick wrote in the 18th comment:
Votes: 0
As far as I can tell, it's merc.h. It's set before ability.c. I don't know what it could be.
Would changing the compiler work? It's set at gcc right now. this is the ability.c file.

#if defined(macintosh)
#include <types.h>
#include <time.h>
#else
#include <sys/types.h>
#include <sys/time.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"
#include "interp.h"
#include "magic.h"
#include "recycle.h"
#include "ability.h"

void one_hit args ((CHAR_DATA * ch, CHAR_DATA * victim, int dt));
14 Apr, 2009, David Haley wrote in the 19th comment:
Votes: 0
Oh, I forgot it's merc.h in ROM, not mud.h.

Could you post the definition of struct ability_table? (filename, line number, and definition of the whole structure)
14 Apr, 2009, erdrick wrote in the 20th comment:
Votes: 0
ability_table is found under ability.c, and it basically one line followed by like, hundreds of lines, it starts off like this, it's line 22.

const struct ability_data ability_table[] = {
{"A-Save", do_reaction, JOB_DANCER, SKILL_A_SAVE,$
{"Abandon", do_reaction, JOB_NINJA, SKILL_ABANDON$
{"Absorb-Used-MP", do_reaction, JOB_ORACLE, SKILL_ABSORB_$
{"Accumulate", do_accumulate, JOB_SQUIRE, SKILL_ACCUMUL$
{"Angel-Song", do_angel_song, JOB_BARD, SKILL_ANGEL_S$
{"Antidote", do_antidote, JOB_CHEMIST, SKILL_ANTIDOT$
{"Any-Ground", do_movement, JOB_GEOMANCER, SKILL_ANY_GRO$
{"Any-Weather", do_movement, JOB_ORACLE, SKILL_ANY_WEA$
{"Armor-Break", do_armor_break, JOB_KNIGHT, SKILL_ARMOR_B
0.0/36