Compiling ChessV 9.2

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Compiling ChessV 9.2

Post by hgm »

Does anyone know how to compile ChessV with g++/cygwin ? There is no Makefile with the v9.2 sources I have, and when I try to compile by hand I get errors. (Missing fvec.h include, numeric constants too long for data type...)
User avatar
Jim Ablett
Posts: 1384
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Compiling ChessV 9.2

Post by Jim Ablett »

hgm wrote:Does anyone know how to compile ChessV with g++/cygwin ? There is no Makefile with the v9.2 sources I have, and when I try to compile by hand I get errors. (Missing fvec.h include, numeric constants too long for data type...)
Hi Harm,

I don't think gcc uses fvec.h (FloatVector) , it's Msvc.
I can compile ChessV ok using Msvc 2005.

Jim.
User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Compiling ChessV 9.2

Post by hgm »

So it is a really MSVC-specific source? That will make it hard for me to modify it. I thought I found a way to turn it into a WinBoard engine. I never dared to try this before, but I think that by now I have learned enough of how Windows programs work to recognize how the moves are entered by mouse, and perform the same actions based on a move coming in as a text string. But if there is no way I can test... :cry:
User avatar
Jim Ablett
Posts: 1384
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Compiling ChessV 9.2

Post by Jim Ablett »

hgm wrote:So it is a really MSVC-specific source? That will make it hard for me to modify it. I thought I found a way to turn it into a WinBoard engine. I never dared to try this before, but I think that by now I have learned enough of how Windows programs work to recognize how the moves are entered by mouse, and perform the same actions based on a move coming in as a text string. But if there is no way I can test... :cry:
That's a shame :(

You could always 'bite the bullet' and download the Microsoft compilers.

http://www.microsoft.com/express/vc/
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

Jim.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Compiling ChessV 9.2

Post by Greg Strong »

Sorry, HG. I'm afraid it's very Microsoft specific. I know at least one skilled unix programmer who tried to make it more portable and gave up. Truthfully, it's probably not worth it unless you are interested in the more obscure games that it can play. For 10x8 chess and other common variants there are stronger engines out there. There were some unfortunate design decisions made that would be too hard to correct, which is why I've started over from scratch. But you could always help me with Quadrox :)
User avatar
hgm
Posts: 27809
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Compiling ChessV 9.2

Post by hgm »

Well, I did download MSVC, and when I clicked the ChessV project file it did start a wizzard to convert it to the format for the new version. And it could even build a ChessV.exe after I moved a declaration in Game.cpp which cause to 9 errors. So apart from f*ing up my registry, causing that all C source files files no longer open in notepad when I click them, I guess everything is fine.

But how can this cr*p be used? How can I set or alter compiler flags, so that it is no longer a windows application but becomes a console application? Is there a way to run the compiler from the command line?
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Compiling ChessV 9.2

Post by diep »

hgm wrote:Well, I did download MSVC, and when I clicked the ChessV project file it did start a wizzard to convert it to the format for the new version. And it could even build a ChessV.exe after I moved a declaration in Game.cpp which cause to 9 errors. So apart from f*ing up my registry, causing that all C source files files no longer open in notepad when I click them, I guess everything is fine.

But how can this cr*p be used? How can I set or alter compiler flags, so that it is no longer a windows application but becomes a console application? Is there a way to run the compiler from the command line?
Says the guy who plays with an elephant on his chessboard!
User avatar
Jim Ablett
Posts: 1384
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Compiling ChessV 9.2

Post by Jim Ablett »

hgm wrote:Well, I did download MSVC, and when I clicked the ChessV project file it did start a wizzard to convert it to the format for the new version. And it could even build a ChessV.exe after I moved a declaration in Game.cpp which cause to 9 errors. So apart from f*ing up my registry, causing that all C source files files no longer open in notepad when I click them, I guess everything is fine.

But how can this cr*p be used? How can I set or alter compiler flags, so that it is no longer a windows application but becomes a console application? Is there a way to run the compiler from the command line?

Go to project menu/properties to change all settings.
You can run compiler from command line. Path to command line compiler
(cl.exe) on my computer is

Code: Select all

 D:\Program Files\Microsoft Visual Studio 8\VC\bin
Simple way would be >
Create a backup of your bin folder, copy all your src code to bin and run compiler from there.

Jim.
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Compiling ChessV 9.2

Post by bnemias »

I haven't looked at the express versions mentioned earlier.

But every version of MSVC or Visual Studio I have encountered has a .BAT file to set up for command line compiling. Most versions will optionally offer to register environment variables for cmdline compiling. (one version I have just did that, not giving me a choice and I had to remove the env vars to keep it from stepping on the toes of the other compilers I use)

I wrote my own .BAT file to set up for various compilers, including various MS ones. My .BAT file calls the appropriate VCVARS.BAT from MS compilers when I choose one.

Default install locations listed...

Code: Select all

MSVC 4.x: "c:\msdev\bin\vcvars32.bat x86"
MSVC 6.0: "c:\microsoft visual studio\vc98\bin\vcvars32.bat"
MSVC 7.0: "c:\microsoft visual studio .NET\vc7\bin\vcvars32.bat"
MSVC 7.1: "c:\microsoft visual studio .NET 2003\vc7\bin\vcvars32.bat"
MSVC 8.0: "c:\microsoft visual studio 8\vc\bin\vcvars32.bat"
It's probably the same for newer ones too. I'll be installing Visual Studio 2008 this week so I can test that.
bnemias
Posts: 373
Joined: Thu Aug 14, 2008 3:21 am
Location: Albuquerque, NM

Re: Compiling ChessV 9.2

Post by bnemias »

hgm wrote:So apart from f*ing up my registry, causing that all C source files files no longer open in notepad when I click them, I guess everything is fine.
I hear ya. The install has no option, "I just want to use the cmdline and I know what I'm doing, so please don't write to the registry at all. I have no interest in .NET, ODBC, OLE, ATL, COM and want none of that sh*t registered."