Compiling nethack on OSX

Zesty

Registered
Hey all-

I'm trying to get Nethack 3.3.1 running on OSX, but am running into a problem: It won't find the termcap library. I've fixed all the compile bugs that cropped up (will post a full list when it's all done), but in the linking part, I get the error:

/usr/bin/ld: can't locate file for: -ltermcap

i've tried curses and termlib, but same results. I notice there isn't a termcap file, unlike a Linux box I have, located in /etc, but this is a text file of different terminal types, surely they want an actual compiled binary library, but for the life of me can't get it to work. I'm afraid it's something to do with Apple's slight liberties with the filesystem, but perhaps I'm missing something?

I have the developer disc, but think those tools are for more gui work than this low level bsd stuff. Maybe I'm missing something?

Thanks for any info,

Zesty
 
You shouldn't need any -l arguments in OS X/darwin. Just like linux it includes all needed libraries automatically. Try compiling without it.

Sometimes one have to add a -framework though.
 
That did it. Nethack 3.3.1 is now officially working in MacOS X ... I will be posting all build instructions shortly ( instead of keeping them in a text file in the source folder, I used TextPad ... )

The beautiful thing about OSX, which I like about Unix in general, is that I was able to do everything remotely. Never even touched the console to get it working. This is really fun!

Zesty
 
I've downloaded the 'official' 3.3.1 in the form of a pkg file. I clicked it, enterred my administrator password, and it installed. As far as I can tell, by exploring through the various file structures, it seems to have installed properly in /usr/games/... and i even found the 'executable' file named nethack. When in the terminal, I tried to run it by just typing nethack when I was inside the directory, but it won't run!!!! Do I have to run it inside the terminal program? How do I do that?! Any help would be appreciated!





<<
Originally posted by Zesty
That did it. Nethack 3.3.1 is now officially working in MacOS X ... I will be posting all build instructions shortly ( instead of keeping them in a text file in the source folder, I used TextPad ... )
>>
 
sorry, I forgot to say I got the link for the download from www.nethack.org.

I also saw something about changing the owner of the file/game? to 'games'? Do I have to create a user named 'games' w/o a login password? How do I do that!?

I'm used to have a minimal working knowledge of unix at school a LONG time ago (over 10 yrs) so I'm really rusty!
 
Back
Top