The Watcom compiler was open-sourced a few years back; it's properly OpenWatcom now.
Hence
I'm trying to get Open Watcom to work for me at the moment.
Incidentally it is apparently possible to work around the 'same filename different directory' problem, but it's not very user friendly so I'm leaving it for now.
VC++ has its own quirks (angband.ico has to be in the same directory as angband.rc, for instance).
To be fair its last release was in February 2009 so it wasn't exactly obvious to me that it was obsolete.
I had no idea. I wonder what keeps it alive? Anyway, those warnings are wrong.
Really, gcc (aka MINGW) and Visual Studio are the industry standards, with Sun and HP still around for special-purpose code. (lcc is still out there for a light-weight portable compiler, but since it doesn't include C++, it's kind of obsolete.)
Not having much luck yet. Some of the warnings appear incorrect (to my inexperienced eye). For example the following line
Code:
if (parse_under && (ke.key >=0 && ke.key <= 32))
gets a "Warning! W124: Comparison result always 1", but I can't see what's wrong with it.
Looks like ke.key is unsigned on Watcom, when it's not elsewhere. Hence, "ke.key >= 0" will always be true.
I also have a whole bunch of
Symbol 'SCREEN_REGION' has been defined, but not referenced
warnings, but it's being used like
menu_layout(menu, &SCREEN_REGION);
all over the place. Does 'referenced' mean something else than what I think it does?
No. What's happening is that a header file is causing SCREEN_REGION to be defined as static in every single file, even those which don't make use of it. You'll only be getting warnings from the files which don't reference SCREEN_REGION but nevertheless include the ui.h (I think) file.
@paul-
looks like you need a new (or at least different) compiler.
Probably. Getting used to a new compiler is a pain though. I've been through BCC32 and LCC32 before Dev-C++. I'm trying to get Open Watcom to work for me at the moment.
@paul-
looks like you need a new (or at least different) compiler. Some of those warnings are almost certain bugs, like the messed-up return values. And the missing parentheses are also risky practice. If you mean (A || (B && C)), it's wise to write it that way, because sometimes you might have really meant ((A || B) && C). logical precedence rules are sometimes nonintuitive.
Install MINGW/gcc and run it occasionally for compiler warnings, even if you are using DevCC for editing.
It compiles on i386 Linux, but only after I manually set autogen.sh to be executable!
Apparently my setup doesn't copy SVN properties with files. I've set it now.
I did configure --with-noinstall, so it compiled with X11 and curses support but not SDL. It compiled with the following warnings:
Looks like your compiler checks for more (or at least different) warnings than mine does.
object/obj-info.c: In function 'describe_slays':
object/obj-info.c:402: warning: unused variable 'descs'
object/randart.c: In function 'parse_frequencies':
object/randart.c:1450: warning: suggest parentheses around && within ||
object/randart.c: In function 'add_ability':
object/randart.c:3136: warning: suggest parentheses around && within ||
object/randart.c: At top level:
object/randart.c:796: warning: 'do_p2val' defined but not used
store.c: In function 'store_maint':
store.c:1443: warning: 'return' with no value, in function returning non-void
store.c:1449: warning: 'return' with no value, in function returning non-void
store.c:1519: warning: control reaches end of non-void function
Think I've got all those.
I don't have time to play-test it, but now I've checked it out I'm happy to update and recompile periodically to confirm that it still builds under Linux.
Unfortunately I don't really need a play tester right now - at least until I fix one major bug I've just noticed.
Btw, you really want to keep your trunk free of all the configure-related stuff. That's the whole point of using autogen.sh
Apart from 'autoconf.h.in' (which I put in due to an earlier misunderstanding) I think all the 'configure related stuff' is present in the Angband SVN trunk.
It compiles on i386 Linux, but only after I manually set autogen.sh to be executable! I did configure --with-noinstall, so it compiled with X11 and curses support but not SDL. It compiled with the following warnings:
object/obj-info.c: In function 'describe_slays':
object/obj-info.c:402: warning: unused variable 'descs'
object/randart.c: In function 'parse_frequencies':
object/randart.c:1450: warning: suggest parentheses around && within ||
object/randart.c: In function 'add_ability':
object/randart.c:3136: warning: suggest parentheses around && within ||
object/randart.c: At top level:
object/randart.c:796: warning: 'do_p2val' defined but not used
store.c: In function 'store_maint':
store.c:1443: warning: 'return' with no value, in function returning non-void
store.c:1449: warning: 'return' with no value, in function returning non-void
store.c:1519: warning: control reaches end of non-void function
I don't have time to play-test it, but now I've checked it out I'm happy to update and recompile periodically to confirm that it still builds under Linux.
Btw, you really want to keep your trunk free of all the configure-related stuff. That's the whole point of using autogen.sh
It looks like a number of files had gone missing (or not been copied in the first place) that relate to compiling in Linux. I have fixed everything I could find of them.
Ok, well I commiserate you on your experience so far. Linux is well worth persevering with - once you master it, you'll never look back. If you do give it another try, let me know.
In the meantime, I'll have a go at compiling your variant. Watch this space.
Thanks. I had someone give it a go from rec.games.roguelike.development but they had a rather odd error not the same as the earlier report I had (which had something reported wrong with 'object.txt').
src/autoconf.h.in was said to be missing, but that is supposed to be autogenerated (according to what I read in rephial).
Ok, well I commiserate you on your experience so far. Linux is well worth persevering with - once you master it, you'll never look back. If you do give it another try, let me know.
In the meantime, I'll have a go at compiling your variant. Watch this space.
I don't understand - what's stopping you getting Linux? It's not like saying "I don't have MacOS" or "I don't have RISCOS". You can download Linux and test the compilation yourself in less than an hour.
??
Well for one thing I'm on a limited bandwidth internet connection (that goes over about one month in three).
For a second I know nothing worth mentioning about Linux so it would take me a lot longer than an hour to get up to speed.
Seriously though, even if it's 'just' an hour it should be more like five minutes to someone who already knows Linux and has experience compiling Angband variants.
[EDIT] Oh yes, I also have no writeable CDs, no CD writer attached to my computer and the last time I tried to install Linux on a computer it worked for about a fortnight then mysteriously stopped booting on the Linux partition which never worked again.
Leave a comment: