Nmake, MSBuild, Visual Studio and Crafty!

 

I used to play chess, on an infrequent basis. I've won class chess tournaments in every amateur class. Of course this means I started playing chess at the lowest level for amateurs and worked my way up to the highest level of amateur play. I think I would've made it further in my chess ventures (weak master) if I had an opponent like Crafty  too play against on a regular basis.

Crafty is a chess program that started life as Blitz back in 1968. Blitz was written by Robert Hyatt, an undergraduate of Computer Science. Dr. Hyatt started receiving sponsorship from Cray (the super computer company) in 1980, and Blitz became Cray Blitz. Cray Blitz won the world chess championships for computers in 1983 and 1986. Cray continued to sponsor Dr. Hyatt through 1994. Since then, Dr. Hyatt has continued to work on his chess program, but renamed it Crafty.

I recently thought about Crafty, and decided to download it and play a game of Chess. So I visited ftp://ftp.cis.uab.edu/pub/hyatt and downloaded Crafty. An already compiled executable already exists at ftp://ftp.cis.uab.edu/pub/hyatt/executables but if you want to mess around with this program and try to improve it you need to get a copy of the source files at ftp://ftp.cis.uab.edu/pub/hyatt/source I downloaded a copy of the executable (so I could play it a game before doing anything else) and the source code, too.

I've been using VC++ on Visual Studio 2010, of late. To compile Crafty you need to run the batch file that comes with Visual Studio 2010 VC++, vcvars32.bat. Next you need to look for the make file that comes with the source code and enter nmake Makefile.xp   (the make file supplied with Crafty is Makefile.xp; nmake is the Microsoft make tool).  ...but what if you want to compile while using the IDE; i.e., Visual Studio 2010? 

Please download the files listed below this paragraph. These are the project and solutions files generated by Visual Studio 2010 VC++ (Express) when I entered the compilation flags, linker flags, etc. from the make file, Makefile.xp into the IDE. Put them in the same directory as the source code and start up Visual Studio 2010 VC++. You will be able to compile the source code from the IDE. You will have to rename the files by getting rid of the txt suffix at the end of each file name. Theoretically you could also compile by using msbuild.exe I wasn't able to try out msbuild.exe because the Express version of VC++ doesn't seem to support 32 bit executables when compiling with msbuild.exe  

BTW, I was thinking of putting this article in my blog section, only. Crafty isn't my program, it's Robert Hyatt's. The links below goto to files I created too compile Crafty, using Visual Studio 2010 VC++. Furthermore, this article would be of more interest to somebody interested in my programming list, as opposed to my blog page.

 

http://community-info.org/Crafty/src/Crafty.sln.txt
http://community-info.org/Crafty/src/Crafty.vcxproj.txt
http://community-info.org/Crafty/src/Crafty.vcxproj.filters.txt
http://community-info.org/Crafty/src/Crafty.vcxproj.user.txt

Back To My Blog Page   Back To My Program List