From NetHackWiki
Jump to: navigation, search

I tried to download MinGW, and WinRAR said that w32api-3.9.tar within the file under the current section is corrupt. Am I donwloading the wrong file? -- 14:44, 29 April 2007 (UTC)

.tar.gz is not a rar-file. WinZip (at least) knows how to open .tar.gz files. --Paxed 15:15, 29 April 2007 (UTC)
Also, you don't need to download any .tar.gz files; there's a MinGW-5.1.3.exe that you want. --Paxed 15:20, 29 April 2007 (UTC)
Oh, guess I was grabbing the wrong file. Thanks a ton. -- 21:36, 29 April 2007 (UTC)

How do I open Makefile.gcc so I can get NetHack on graphical mode? 22:48, 20 May 2007 (UTC)

Makefile.gcc is a plain ASCII text file, you can open it with notepad or any editor of your choice. But you have to make sure your editor uses real tabs (not spaces expanded to tab widths) as makefiles need real tabs. - Progo 05:27, 21 May 2007 (UTC)


This is my first time ever compiling anything more complicated than "Hello World", and I've never touched the command line outside of Windows before, so I'm sure I'm missing plenty, but the instructions didn't work for me and this is how I fixed it: I spent several hours working out that two lines of

E int FDECL(srandom, (unsigned int));

need to be commented out in system.h to get it to compile.

Also, the given permissions didn't work so I just set all to 777 and they did (...again, noob; correct me if you know better, and the given instructions didn't work on any of these counts). And don't forget to add /usr/games to your $PATH and bash profile. Currently trying to use these instructions to compile SlashEM, too.


PS: Ah!

Could someone update the Windows section?

MinGW is now at version 5.1.6; the article needs to be updated to reflect this, since the current instructions don't work for 5.1.4 (the earliest still-available version). Dr. 8-Bit 01:28, April 19, 2010 (UTC)

Never mind; it seems I merely forgot to install the make component. Dr. 8-Bit 16:34, May 6, 2010 (UTC)


I keep getting an error when compiling with tty graphics:

process_begin: CreateProcess(NULL, windres -oo/console.o --include-dir ../sys/winnt -i ../sys/winnt/console.rc, ...) failed
make (e=2): The system cannot find the file specified.
ming32-make: *** [o/console.o] Error 2

Does anyone know what I can do to fix the problem? -Thanks, JDGKruse 04:21, June 1, 2010 (UTC)


According to source it is also possible to compile with Microsoft Visual C V6.0 SP3 Bulwersator 17:30, 13 December 2010 (UTC)

But is is failing on "..\win\win32\winhack.rc(248) : error RC2135 : file not found: tiles.bmp" anyway... Bulwersator 17:56, 13 December 2010 (UTC)

Windows 7

Do the Windows compile instructions work on Windows 7 with MinGW? -- 21:20, 23 November 2012 (UTC)

Windows 7 MinGW compile failure

Following the directions in the Install.NT:

   1.  It almost goes without saying that you should make sure that your
   tools are set up and running correctly.  That includes ensuring that
   all the necessary environment variables for the compiler environment
   are set correctly.  (Examples: For the Microsoft compiler by
   executing vcvars32.bat, which is probably in the bin directory of 
   your compilers directory tree. For the Borland Makefile, you can 
   simply invoke the Make utility from the Makefile's directory (For 
   the standard Borland compiler installation you can just use the
   explicit path "c:\borland\bcc55\bin\make /f Makefile.bcc".  For the
   GCC Makefile, add <mingw>\bin to your path, where <mingw> is your
   MinGW root directory.)

I did install MinGW but evidently there was a lot I missed. I checked it over again and found out there was a bunch of catalogs and stuff and so I just installed everything, and when I updated the catalog again I found nothing left that wasn't installed.

I just want to try and compile it before I dink around with the source code so I skipped ahead to step 5 (after running the NHSetup.bat in the /sys/winnt directory):

   5.  Now that everything is set up, change your current directory to src.

And I went with...

   For GCC:
       mingw32-make -f Makefile.gcc install

Just for no reason I tried it without the install parameter and it did a lot of things but eventually I ended up right back where I am now. When I ran it with the install parameter and I get this:

   C:\nethack-3.4.3\src>mingw32-make -f Makefile.gcc install
   creating directory o
   gcc -c -mms-bitfields -I../include  -g -DWIN32CON -oo/makedefs.o ../util/makedefs.c
   gcc -c -mms-bitfields -I../include  -g -DWIN32CON -DDLB   -oo/monst.o  ../src/monst.c
   gcc -c -mms-bitfields -I../include  -g -DWIN32CON -DDLB   -oo/objects.o  ../src/objects.c
   ..\util\makedefs -v
   Makefile.gcc:655: recipe for target '../include/date.h' failed
   mingw32-make: *** [../include/date.h] Error -1073741819

I looked at the makefile but I wasn't really able to get anything out of it (I'm really, REALLY new with this kind of low-level stuff). Also, I noticed that the date.h file was empty, and that in the makefile (Makefile.gcc) it says that it gets created on every compile... so what's happening? Why is it failing like this without even changing anything? What am I doing wrong?

-- 20:26, 4 August 2014 (UTC)Will