I tried looking at the makefile.osx from vanilla, but can't really make sense of, for example, how $(BASEOBJS) gets defined, or where it lives. But one thing that is *definitely* wrong with Chengband (which, based on Heng, lacks any osx makefile) is that the file listings in the makefiles are wrong. See, there are 5 makefiles, each of them listing all the object files that need to be compiled. 5 lists, and me rapidly changing the true list of files to compile (in Hengband.vcxproj), means they aren't kept up to date. Especially since none of them work on Windows
But, I can provide a list of files that need to be compiled, if that is where the error is occurring. Or is it a compilation error in main-mac.c? I can't help with that, I'm afraid.
Running the autotools to generate configure script and makefiles, and then ./configure and make worked until it tried to compile main-gcu.c
make -f Makefile.std fell over at mutation.c
Then I gave up.
So I didn't use main-mac.c at all, and I didn't try to hack the makefiles. My knowledge of OSX is not very 1337.
I suspect that probably the right thing to do is edit Makefile.std to have the right sources, and then compile for x11 only; I may try and do this some time in the next few days.
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
I failed by not trying very hard...
I suspect that probably the right thing to do is edit Makefile.std to have the right sources, and then compile for x11 only; I may try and do this some time in the next few days.
I'm trying to attach a modified makefile.std. I had to add a .txt extension to get this to work. Modifying this file took about 20 minutes to do, so I'd feel really guilty if anybody other than me had to suffer
Is makefile.std how everyone compiles on Linux? I had an e-mail from someone who ended up using makefile.am. I suppose I can make an effort to keep one makefile up to date.
Can someone please tell me how to compile Chengband on Linux?
I tried with "make -fmakefile.std" but got the error:
cc1: error: unrecognized command line option "-m486"
make: *** [z-util.o] Error 1
Make sure you are using the makefile.std attached earlier in this thread. And I think just removing the -m486 will work.
For reference, my troubles with getting Hengband (not Chengband) to compile under linux are documented here http://angband.oook.cz/forum/showthread.php?t=2648, and I did eventually make it work. So, at least there is a chance Chengband can run on linux
Thank you, chris. With your advice I could advance a bit further in the process. Then I got the error:
readdib.c:20:21: error: windows.h: No such file or directory
I think I'll try out the Windows version instead, and possibly try to compile it in Windows, since you developed it in Windows.
Thank you, chris. With your advice I could advance a bit further in the process. Then I got the error:
readdib.c:20:21: error: windows.h: No such file or directory
I think I'll try out the Windows version instead, and possibly try to compile it in Windows, since you developed it in Windows.
Do you mind trying to just remove readdib from the makefile? There are three places:
SRCS = ... readdib.c ...
OBJS = ... readdib.o ...
and later,
readdib.o: readdib.c $(INCS)
I don't have a linux handy or I would get this working ... Sorry for the troubles!
For Windows, just use the Hengband.sln with Visual Studio 2010 Express. None of the makefiles work ... though I suspect makefile.bcc could be made to work but then you can't debug.
OK, I can get a little further. I have hacked makefile.std a little more: makefile.std.txt
This now compiles on the command line on my Mac (Snow Leopard), but hangs on running. I tried with and without a savefile - on the attempt with, it seemed to be hanging in the while(1) loop in Rand_div in z-rand.c while trying to generate wilderness seeds.
It would be interesting to see if this works on linux.
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
It would be interesting to see if this works on linux.
After immense pains, I was able to compile and run on linux. (The hardest part was figuring out all the developer packages to install for external dependencies. The second hardest part was actually working on my ancient crappy laptop . Seems to run fine, so I think the hang up must be a Mac thing ...
I committed a makefile.std to the repository that works for linux.
Comment