Cygwin for chess

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jarkkop
Posts: 198
Joined: Thu Mar 09, 2006 2:44 am
Location: Helsinki, Finland

Re: Cygwin for chess

Post by jarkkop »

Remember to install MS SDK that includes header files, like windows.h
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: Cygwin for chess

Post by brianr »

Also, both VC++ express and gcc/Cygwin only produce 32 bit code.
Visual Studio 2008 Express does generate 64 bit code if the SDK has also been installed,
and a few menu options are properly set. See:

http://64.68.157.89/forum/viewtopic.php ... =&start=10
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: Cygwin for chess

Post by Aleks Peshkov »

Beware that Cygwin is problematic for releasing non-GPL code. I suggest to use MinGW alternative.
oysteijo

Re: Cygwin for chess

Post by oysteijo »

As some other responders have said: You should use MinGW.

The difference of Cygwin compiled executables and and MinGW executables is that Cygwin will link to a dynamic library cygwin1.dll (or something like that). Cygwin emulates a full (?) POSIX layer and all those things are inside this this dll.

MinGW executables link to msvcrt.dll.

-Øystein
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: Cygwin for chess

Post by beachknight »

oysteijo wrote:As some other responders have said: You should use MinGW.

The difference of Cygwin compiled executables and and MinGW executables is that Cygwin will link to a dynamic library cygwin1.dll (or something like that). Cygwin emulates a full (?) POSIX layer and all those things are inside this this dll.

MinGW executables link to msvcrt.dll.

-Øystein
and perhaps a question for general interest:

Where to find latest cygwin1.dll & msvcrt.dll files
for w32 and x64 OSs, ie XP & Vista?

Best,
hi, merhaba, hallo HT
Eizenhammer

Re: Cygwin for chess

Post by Eizenhammer »

Where to find latest cygwin1.dll & msvcrt.dll files
for w32 and x64 OSs, ie XP & Vista?

Best,
The homepage of the cygwin project is here:
http://www.cygwin.com/

and the msvcrt should be part of your Windows.
Dann Corbit
Posts: 12564
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Cygwin for chess

Post by Dann Corbit »

oysteijo wrote:As some other responders have said: You should use MinGW.

The difference of Cygwin compiled executables and and MinGW executables is that Cygwin will link to a dynamic library cygwin1.dll (or something like that). Cygwin emulates a full (?) POSIX layer and all those things are inside this this dll.

MinGW executables link to msvcrt.dll.

-Øystein
It is important to note that Cygwin has capabilities that Mingw lacks. For instance, fork() is not present in Mingw but it is in Cygwin.
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: Cygwin for chess

Post by beachknight »

Eizenhammer wrote:
Where to find latest cygwin1.dll & msvcrt.dll files
for w32 and x64 OSs, ie XP & Vista?

Best,
The homepage of the cygwin project is here:
http://www.cygwin.com/

and the msvcrt should be part of your Windows.
Thanks for general answer.

To find cygwin1.dll in http://www.cygwin.com/ for layman is not easy.

I may therefore give a direct link to Arena website:

http://www.playwitharena.com/

MS VC/VCpp rt libs are being updated frequently.
Perhaps, a download file which includes all 50, 60,
70, 71, 80, 90 etc files would be very useful.

Best,
hi, merhaba, hallo HT
User avatar
Onno Garms
Posts: 224
Joined: Mon Mar 12, 2007 7:31 pm
Location: Bonn, Germany

Re: Cygwin for chess

Post by Onno Garms »

hgm wrote:My own code does not contain any such things. I do not know about include-library headers, of course, but apart from reading the clock and standard i/o (from which my engine refrains during search), I do not call any routines I did not write myself.
To query the timer you will have to know your OS:
- Either you query the Windows timer and compile with -mno-cygwin or with Visual Studio
- or you query the Unix timer and compile without -mno-cygwin.

To read input during search, you would have to probe for input without blocking or use threads. Both require OS access in the end.
I thought the -mno-cygwin compile would just link as subroutines in the executable what otherwise would be in the DLL.
To my knowledge, -mno-cygwin does not link against cygwin1 (.lib?) statically. (Btw. - unless you buy a commercial Cygwin lincense - this would make your executable depend on the GPL like it does when compling without -mno-cygwin.) -mno-cygwin makes the executable not to use cygwin1.dll at all.

-mno-cygwin has heavy implications on how your code must be written. With -mno-cygwin, you access Windows directly. Without, you feel like in a Unix environment. Maybe you didn't notice because you access the OS only for timing.
User avatar
Onno Garms
Posts: 224
Joined: Mon Mar 12, 2007 7:31 pm
Location: Bonn, Germany

Re: Cygwin for chess

Post by Onno Garms »

brianr wrote:
Also, both VC++ express and gcc/Cygwin only produce 32 bit code.
Visual Studio 2008 Express does generate 64 bit code if the SDK has also been installed,
and a few menu options are properly set. See:

http://64.68.157.89/forum/viewtopic.php ... =&start=10
Cool, thanks a lot for that hint.