Computer Chess Club Archives




Subject: Re: Nalimov-EGTBs in ANSI-C?

Author: Heiner Marxen

Date: 10:14:30 01/22/00

Go up one level in this thread

On January 22, 2000 at 02:43:07, Angrim wrote:

>On January 21, 2000 at 18:50:24, Heiner Marxen wrote:
>>I would like to add (the latest version of) the Nalimov EGTBs
>>to my program Chest.  I understand that the probe code module
>>from Eugene Nalimov ("egtb.cpp" in the Crafty distribution)
>>is C++, in a non-trivial way (contains templates).
>>My program up to now is pure ANSI-C, and I would very much prefer
>>to stick to ANSI-C, since I want it to be portable to all those
>>UNIX platforms, which have an ANSI-C compiler, but lack a C++ compiler
>>(e.g. my development platform).
>All unix platforms that I am aware of have a c++ compiler for them.

Yes, that is right.  First, most UNIX vendors offer a C++ product,
but in many cases it is (prohibitively) expensive.  That may have changed
in the last years (since we checked), but I doubt it.
So, this is often not the way to go.  I would not expect someone to buy
a C++ compiler just for the joy of compiling Chest.

Then, there is g++ for free ...

>According to the g++ man page:
> g++ - GNU project C++ Compiler
>The C and C++ compilers are integrated; g++ is a script to call
>gcc with options to  recognize  C++.

Yes, of course.  i'm well aware of GNU and gcc and g++ etc.

>So if your platform is supported by gcc, it has a c++ compiler.

This is not exactly true: it *can* have a C++ compiler.  But it
must be installed.  Have you ever installed GNU software (e.g. g++)
on a not so standard platform?  It can have a large bunch of problems:
you may need to fist get GNU make, and GNU assembler, and GNU loader
and GNU m4 (since it is used as part of the installation script)
and and ...

I have done several installations of GNU software on different UNIX
platforms, and while it was quite easy sometimes, it also was a nightmare
at other times.

You see, my reasons for avoiding C++ is not that I do not know about it,
or dislike it (I like C++, I have worked with C++ for 3 years), it is
because for the intended target platforms it is not always easily available,
while ANSI-C *is* always available.

Anyhow, thanks to you and all the others for their helpful comments.
It looks like there is no plain and easy solution for plain ANSI-C EGTBs.
I have to think about it for some time, before I decide how to incorporate
them into my program.  May be the best method is to accept the C++, but
to make it conditionally by a #define manifest.  That way one can stick
to pure ANSI-C, but looses EGTB support in that case.

Again, thanks to all.


This page took 0.01 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.