View Single Post
Old July 27, 2007, 23:09   #2
Join Date: Jul 2007
Posts: 18
ctate is on a distinguished road
Lightbulb Building Angband with MSVC 2005

Originally Posted by APWhite View Post
So you other Windows users, what are you using for compiling and debugging?

I have used Borlands freecommandlinetools for years. It is nice that there is a makefile.bcc included in the old versions of the game. I see now that 308 is out there is no makefile for Borland. What are we to use for a compiler and / or command line makefiles?

I also have Visual Studio 2005 but I have only used for PDA applications and have never been able to get it to understand how to use the angband code (so Solution or Project files).
Based on recent experiences I had at work with Borland's C/C++, I would not recommend using it. Ever. For anything.

I believe the canonical Angband build system uses gcc. Directions for building under cygwin or with DevC++ are in the development wiki. It built for me pretty straightforwardly using this command line from the angband/src directory in cygwin:

MINGW=yes make -f

Right now, personally, I'm using VS2005 Express to take advantage of the debugging environment.

To use VS2005, you need to have the Windows SDK installed as well. Create an empty Windows Application solution, then add all of the Angband src/*.c and src/win/*.c files, as well as the .rc and .ico files. Make sure that the symbol WINDOWS is defined as a compiler command-line option. In order for the resource compiler to find the .ico file at build time, you'll have to add the .ico file location to the include path. To use sound, you will need to add Winmm.lib as an additional library as well. (To build without sound support, comment out the line #define USE_SOUND in config.h.) You can also be fancy about a post-build event in order to copy the .exe to a useable spot so you can just double-click launch it and it will find the lib/ dir properly.


Last edited by ctate; July 29, 2007 at 05:40.
ctate is offline   Reply With Quote