Forum:Cannot compile Nethack/SlashEm using tiles.

From NetHackWiki
Jump to navigation Jump to search


I've been trying to compile NetHack and Slash'Em from the source files but cannot get them to compile with the graphical tile set.

I am using Windows 7, unpacked the source files using 7-Zip and used MinGW to compile. My goal is to play a slightly modded Slash'Em with the graphical tile set.

Everything compiles and works fine when I leave the graphical options on default.

I followed everything in the Compiling topic, including moving and editing rpcndr.h for NetHack.

For Slash'Em, I followed the instructions provided:

  1. Run the Setup file in \sys\winnt
  2. Change the Makefile and config.h to use/define MSWIN_GRAPHICS
  3. Run the install.bat I made (almost the same as the one mentioned in the NetHack compile guide)

When that didn't work, I tried various things I saw mentioned in posts/forums/whatever I thought might do it... Of the stuff I can remember:

  • I tried moving and editing rpcndr.h as mentioned in the NetHack wiki compile guide.
  • I tried copying win32api.h to \src and \include as mentioned in the wiki's Ask an Expert #5
  • I tried both of the previous things at once.
  • I tried a solution for a corrupted tiles.bmp mentioned on the old wiki. (Something about the compiler writing tiles.bmp two bytes too long)
  • I tried placing gltile16.png and gltile16.map from normal Slash'Em install into the folder that is supposed to hold the compiled SlashEm.

Another question, possibly related to this or may help out, is it possible to get a log of the compile?

Thank you for listening and possibly helping me out. 206.239.33.97 02:26, 27 April 2013 (UTC)

"When that didn't work" - what exactly happened? Game compiled without tiles? Compile failed (how?)? Produced exe crashes on start? Computer exploded? Bulwersator (talk) 05:12, 27 April 2013 (UTC)
(Just a little note: @IP: you might want to use some kind of list for those <br>-separated lines. @Bulwersator: Please remember to use :'s for talk page indentation.)
What is the output from the compiler/how does it not work, as Bulwersator asked?
(To get a "log", you could redirect output somehow, I suppose, or just copy the output from the compiler.) —bcode talk | mail 11:38, 27 April 2013 (UTC)
(Is that the correct formatting for lists?)
When I compile NetHack, it gives me the file in the binary folder. When I try to run it, it says (each with it's own popup window) "Program initialization has failed." "Report the following error to the NetHack bugs mail address." "cannot load tiles bitmap"
If this helps, the NetHackW.exe that is generated is 4,822 KB.
When I compile SlashEm, the folder to put the game in is created but nothing is in it.
How would I redirect the output? I cannot copy it from the compiler, it automatically closes once it's done.
Thank you for the quick response, 206.239.33.97 18:54, 27 April 2013 (UTC)
"cannot load tiles bitmap" - it seems that you are missing file with tiles. Have you compared folder produced by your compile and folder of downloaded game? Compile proces of UnNetHack requires manual copying of tile file, maybe the same is true for vanilia/SLASH'EM? Bulwersator (talk) 21:19, 27 April 2013 (UTC)
(The list formatting is correct, but you don't need the <br />s. I removed them for you; I hope you don't mind.)
"I cannot copy it from the compiler, it automatically closes once it's done."
Try running it from a command line. —bcode talk | mail 22:05, 27 April 2013 (UTC)
(Some of the formatting may be a bit weird in this post, it was the only way I could get the boxes around the code.
I've ran it from the command line and looked through what I've been able to log. I'm not too sure what I should post here since nothing I've seen has anything that strikes me as an error.
I have this line for various *.o and *.c
gcc -c -mms-bitfields -I../include -I../win/win32 -g -DTILES -DMSWIN_GRAPHICS -D
_WIN32_IE=0x0400 -DDLB   -oo/version.o  ../src/version.c
For the tiles, all I see mentioned for their creation is:
Creating 16x16 binary tile files (this may take some time)
Total of 1057 tiles written to ..\src\tiles.bmp.
After that, "uudecode.exe" is used to create the .bmp files and then delete them, if I'm reading this right:
..\util\uudecode.exe ..\win\win32\mnsel.uu
copy mnsel.bmp ..\win\win32\mnsel.bmp
        1 file(s) copied.
del mnsel.bmp
Then there is "Linking....", "NetHackW is up to date." and what seems to be the section that adds the levels and help files.
I've tried looking at the "tiles.bmp" and I can't open it/view it. I tried putting it in the binary and build folders which had no effect on attempts to run NetHack.
Thanks for the help, 206.239.33.97 00:06, 2 May 2013 (UTC)