[Crawl] Compiling on NetBSD

G

Guest

Guest
Archived from groups: rec.games.roguelike.misc (More info?)

I'm trying to compile Crawl on a system running NetBSD 1.6.2, but it
doesn't quite work. I'm still something of a newbie (bear with me!), so
I'd appreciate it if I could have a bit of help.

First, I extracted the source, went into the makefile, and changed it
to 'MAKEFILE = makefile.bsd'. Then I typed 'make' and it ran for a
while just fine (with the occasional warning), but it hit a snag on
ouch.cc:

g++ -Wall -DBSD -c ouch.cc
In file included from ouch.cc:26:
ouch.h:57: `NULL' was not declared in this scope
*** Error code 1

I opened up ouch.h and hopped to line 57, but seeing as how I don't
know any programming languages whatsoever, I didn't know what, if
anything, was wrong with it. The line, reprinted here, is:

void ouch(int dam, int death_source, char death_type, const char *aux =
NULL);

Any help with this problem is greatly appreciated.
 
Archived from groups: rec.games.roguelike.misc (More info?)

"avomole" <6.022e23@gmail.com> wrote:

>I'm trying to compile Crawl on a system running NetBSD 1.6.2, but it
>doesn't quite work.
>
>In file included from ouch.cc:26:
>ouch.h:57: `NULL' was not declared in this scope
>*** Error code 1

In the beginning of ouch.cc (and spl-cast.cc), write:

#include <stdlib.h>

This fixes those "undeclared NULL" errors on NetBSD.

--
Philipp Lucas
phlucas@online-club.de
 
Archived from groups: rec.games.roguelike.misc (More info?)

Sorry for the late reply; real life and all that.

I modified LDFLAGS and INCLUDES so that they read /usr/pkg/*, and then
ran make again. Now I get this:

g++ -static -L/usr/pkg/lib -I/usr/pkg/include/ncurses -Wall -DBSD
abl-show.o a
byss.o acr.o beam.o chardump.o cloud.o command.o debug.o delay.o
decks.o
describe.o direct.o dungeon.o effects.o fight.o files.o food.o
hiscores
..o initfile.o insult.o invent.o it_use2.o it_use3.o item_use.o
itemname.o
items.o lev-pand.o libutil.o macro.o maps.o message.o misc.o
monplace.o
mon-pick.o monstuff.o monspeak.o mon-util.o mstuff2.o mutation.o
newgame
..o ouch.o output.o overmap.o player.o randart.o religion.o
shopping.o sk
ills.o skills2.o spells1.o spells2.o spells3.o spells4.o
spl-book.o spl-c
ast.o spl-util.o stuff.o tags.o transfor.o view.o wpn-misc.o
liblinux.o -o
crawl -lncurses
liblinux.o: In function `wherex(void)':
liblinux.o(.text+0x1ce0): undefined reference to `getcury'
liblinux.o(.text+0x1ce4): undefined reference to `getcury'
liblinux.o(.text+0x1d00): undefined reference to `getcurx'
liblinux.o(.text+0x1d04): undefined reference to `getcurx'
liblinux.o: In function `wherey(void)':
liblinux.o(.text+0x1d60): undefined reference to `getcury'
liblinux.o(.text+0x1d64): undefined reference to `getcury'
liblinux.o(.text+0x1d80): undefined reference to `getcurx'
liblinux.o(.text+0x1d84): undefined reference to `getcurx'
*** Error code 1

Stop.