Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old April 26, 2015, 04:58   #111
APWhite's Avatar
Join Date: Jul 2007
Location: St George Utah, USA
Posts: 244
APWhite is on a distinguished road
Originally Posted by Mark View Post
Thanks Nick,

I took the second option you suggested and the errors are gone. Trying to compile gives a new Windows error. "The program can't start because libpng12.dll is missing from your computer. Try reinstalling the program to fix this problem." (image attached)

The output window contains:

'Angband15MG.exe' (Win32): Loaded 'D:\Users\mark\Documents\GitHub\angband\build\Debug\Angband15MG.exe'. Symbols loaded.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'Angband15MG.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
The program '[3840] Angband15MG.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

I found libpng12.dll in src\win\dll - not being quite sure what to do I put copies in \src and \src\win. This didn't help. Given the output window referenced other dll's in "C:\windows\SysWOW64" I copied libpng12.dll there too - and this just gave a strange error instead (perhaps the same error but in foreign characters). See attached.

Any ideas? And thanks to everyone helping get this far!
Did you try to change the Configuration Properties->General->Character Set to NOT SET?
APWhite is offline   Reply With Quote
Old May 24, 2015, 20:29   #112
Elfin Jedi
Join Date: Mar 2013
Posts: 102
Elfin Jedi is on a distinguished road
I am trying to build Angband with Netbeans using mingw as compiler. But I am not a computer programmer, and I keep getting this error:

Successfully compiled main.c.
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o).text.startup+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
make.exe[3]: *** [angband.exe] Error 1
make.exe[2]: *** [all] Error 2
make.exe[1]: *** [subdirs] Error 2
make.exe": *** [all] Error 2

I don't know what to do about it.

Last edited by Elfin Jedi; May 24, 2015 at 23:54.
Elfin Jedi is offline   Reply With Quote
Old May 24, 2015, 20:39   #113
Elfin Jedi
Join Date: Mar 2013
Posts: 102
Elfin Jedi is on a distinguished road
Um... that is a : and then (after a space) a ( in the error not a frowning face.
Elfin Jedi is offline   Reply With Quote
Old May 8, 2016, 14:11   #114
Join Date: May 2016
Posts: 1
Ringil is on a distinguished road

sorry, I'm still confused about where to get the latest version.

When I compile the source-tarball on and start Angband, I see:
V 4.0.5

But when I fetch <master> from Github, I see:

Is it possible, that I can ignore the 3 in 4.0.3 ? (Don't say, never ignore the '3' in Angband

Regards, Thanks,
Ringil is offline   Reply With Quote
Old December 17, 2016, 22:58   #115
Join Date: Dec 2016
Posts: 1
aenea77 is on a distinguished road
Problem compiling angband with gcc 6

two days ago I updated my Linux Debian home server from stable(Jessie) to testing (Stretch), the version of the compiler changed to 6.2.1 20161124 (Debian 6.2.1-5).

After that I tried to compile the Angband source code taken from github and I obtained the following error:
/usr/bin/ld: -r and -pie may not be used together

The linker fails when it try to create angband.o, I'm not an expert on gcc but I did some research and it seems that the gcc included in the new Debian version is compiled with the option --enable-default-pie.
With this configuration a program compiled (and linked) through gcc will be a "position independent executable", this is a security feature.
Unfortunately ld can't be invoked with -r and -pie.
A possible solution that I found is to disable the option by using -fno-pie in the compiling phase and -no-pie in the linking phase.
I modified the Makefile under src directory and now the compiling process terminates correctly and I can play Angband again, for your reference I attach to my post the diff file.

Attached Files
File Type: txt Makefile-diff.txt (369 Bytes, 259 views)
aenea77 is offline   Reply With Quote
Old April 2, 2019, 22:03   #116
Pete Mack
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,670
Donated: $40
Pete Mack is on a distinguished road
Compile errors on chromebook virtual machine (samsung chromebook+).
I am trying to do a super bare bones (sort of MinGU--minimum gnu environment for unix) compile. I don't have autoconf (I even installed make separately.)
$ make -f Makefile.std
<command-line>:0:20: error: expected expression before �/’ token
init.c:344:32: note: in expansion of macro �PRIVATE_USER_PATH’
   path_build(buf, sizeof(buf), PRIVATE_USER_PATH, VERSION_NAME);
I verified that UNIX is defined, so PRIVATE_USER_PATH should be "~/.angband". But when I modified init.c directly, it is compiling OK. Anyone have a clue of what is happening?

I also see warnings for missing "static" modifiers for private functions in init.c (init_parse_world, etc.), and duplicate declaration for options_init_cheat in option.h.

In fact, there are TONS of missing static modifiers, missing const, etc.

ncurses is missing from the chromebook core install. Any idea which of the many debian packages to install?
$ apt list | grep ncurses
ekg2-ui-ncurses/stable 1:0.4~pre+20120506.1-13 amd64
fizmo-ncursesw/stable 0.7.10-2 amd64
gambas3-gb-ncurses/stable 3.9.1-3 amd64
lib32ncurses5/stable 6.0+20161126-1+deb9u2 amd64
lib32ncurses5-dev/stable 6.0+20161126-1+deb9u2 amd64
lib32ncursesw5/stable 6.0+20161126-1+deb9u2 amd64
lib32ncursesw5-dev/stable 6.0+20161126-1+deb9u2 amd64
libcunit1-ncurses/stable 2.1-3-dfsg-2 amd64
libcunit1-ncurses-dev/stable 2.1-3-dfsg-2 amd64
libghc-ncurses-dev/stable 0.2.15-3+b1 amd64
libghc-ncurses-doc/stable 0.2.15-3 all
libghc-ncurses-prof/stable 0.2.15-3+b1 amd64
libncurses-gst/stable 3.2.5-1 all
libncurses5/stable,now 6.0+20161126-1+deb9u2 amd64 [installed,automatic]
libncurses5-dbg/stable 6.0+20161126-1+deb9u2 amd64
libncurses5-dev/stable 6.0+20161126-1+deb9u2 amd64
libncursesada-doc/stable 6.0.20150808-2 all
libncursesada4/stable 6.0.20150808-2 amd64
libncursesada4-dev/stable 6.0.20150808-2 amd64
libncursesw5/stable,now 6.0+20161126-1+deb9u2 amd64 [installed]
libncursesw5-dbg/stable 6.0+20161126-1+deb9u2 amd64
libncursesw5-dev/stable 6.0+20161126-1+deb9u2 amd64
ncurses-base/stable,now 6.0+20161126-1+deb9u2 all [installed]
ncurses-bin/stable,now 6.0+20161126-1+deb9u2 amd64 [installed]
ncurses-doc/stable 6.0+20161126-1+deb9u2 all
ncurses-examples/stable 6.0+20161126-1+deb9u2 amd64
ncurses-hexedit/stable 0.9.7-14.1+b1 amd64
ncurses-term/stable,now 6.0+20161126-1+deb9u2 all [installed,automatic]
ruby-ncurses/stable 1.4.9-1 amd64
wordgrinder-ncurses/stable 0.6-3 amd64

Got it. There is something very wrong with the private user data directory--had to hand code it and then create the directory ~/.angband/Angband

The list of recent messages is causing full screen refresh, which is slow. So is running, even with zero movement delay.

Last edited by Pete Mack; April 3, 2019 at 00:48.
Pete Mack is offline   Reply With Quote
Old April 2, 2019, 22:27   #117
takkaria's Avatar
Join Date: Apr 2007
Posts: 1,947
Donated: $40
takkaria is on a distinguished road
libncursesw5-dev and libncursesw5-dev are the ones you want. Not sure about the rest.
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old August 24, 2019, 19:50   #118
Join Date: Jul 2019
Location: Seattle, WA USA
Posts: 133
malcontent is on a distinguished road
FYI - I recently discovered that the Termux android app allows you to download/build/run angband directly on a chromebook without the need to use the dev channel or start a crosh shell etc.

The sequence of commands after installing and starting termux look like this (selectively taken from my command history, hopefully I didn't miss anything):

13 mkdir angband
15 cd angband/
16 wget
19 gunzip angband-4.2.0.tar.gz
21 tar xvf angband-4.2.0.tar
23 cd angband-4.2.0
32 pkg install automake
33 ./
39 pkg install clang
40 ./configure --with-no-install
45 make install
47 ./angband
malcontent is offline   Reply With Quote
Old November 20, 2019, 21:38   #119
Join Date: Nov 2019
Posts: 1
honnyman is on a distinguished road
Good information. Thanks!
honnyman is offline   Reply With Quote
Old December 16, 2019, 08:17   #120
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
VS 2019, _UNICODE, etc

Hi all.

I'm building using VS 2019. The compiler calls out an error in scrnshot.c

scrnshot.c(105): error C4703: potentially uninitialized local pointer variable 'info_ptr' used

The code in question is this:

	/* Create the info structure */
	if (noerror) {                                                               // line 93
		info_ptr = png_create_info_struct(png_ptr);          // line 94
		if (!info_ptr) {
			png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
			noerror = false;

	if (noerror) {                                                               // line 101
		/* Setup error handling for init */
		png_init_io(png_ptr, fp);

		png_set_IHDR(png_ptr, info_ptr, width, height,       // line 105
The error is on the last line shown in the snippet, on the reference to info_ptr.

It looks to me like the code is correct, because if line 105 is reached then
noerror was true on line 101, and if noerror was true on line 101 then it was true on line 93 as well, and that means line 94 was reached and info_ptr
*must* have been inited.

However, I can understand how that logic might defeat the analysis of the compiler front end, causing it to throw up its hands and issue the error.

An easy workaround is to modify the declaration of info_ptr to initialize it explicitly to NULL. I believe this is a totally safe workaround that will be
ok for all other platforms.

	png_infop info_ptr;    // old line 40
	png_infop info_ptr = NULL;    // changed line 40
It does make the error go away for VS2019, so I'm submitting this one-line change for consideration through this post because I haven't figured out the proper way to submit suggested changes.
eastwind is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Angband on MS-DOS Zababa Development 8 May 27, 2011 17:36
Compiling Angband 3.0.9 w/ xcode on OSX Iemortal Vanilla 8 April 16, 2011 16:41
Compiling Z+Angband under Windows Altefcat Variants 8 December 11, 2008 09:44
compiling vanilla angband on msvc++ 9 express hugh Vanilla 6 March 17, 2008 15:49
Trouble compiling angband 3.0.9 on linux RastaRuedi Vanilla 2 August 1, 2007 17:28

All times are GMT +1. The time now is 22:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.