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.
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.
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.
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 :)
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.
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!
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.
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:
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).
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).
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.
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.