Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: how much work it is to change source code to work with linux?

Author: Tord Romstad

Date: 06:13:31 06/23/04

Go up one level in this thread


On June 23, 2004 at 05:10:07, Uri Blass wrote:

>I ask because Dieter told me in an email that I can install Linux, where I can
>get the newest Intel compiler and it is free for non commercial use.
>
>A related question is if I can see examples of code that work under windows and
>descreption of changes that are done to compile it under linux.

Crafty is the most obvious example, but probably a bit too big and complicated
to study.

>Another question is if a program that is compiled under linux can work under
>interfaces like winboard that are based on windows.

Why not just use xboard in Linux?  It behaves almost exactly like Winboard.

>I guess that there should be no problem and as far as I know tord writes gothmog
>under linux and it runs under winboard.

Not quite.  I do the development under Mac OS X, which for most practical
purposes is quite similar to Linux.

But as has been pointed out elsewhere, my engine is not a good example.
The Windows executable of Gothmog is not a "real" Windows program.  It
is compiled using the Cygwin toolkit, which adds Unix-like compatibility
to Windows.  By using the Cygwin tools, I can use exactly the same source
code in Windows and Linux, without a single #if defined ...

The Mac OS code is very slightly different, because of endianness problems.

>When I think about it maybe I need some #if #def to make it work.

Probably, but I don't think you would have to change very much.  The main
differences will be input polling and getting the system time.

Tord



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

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