XBoard 4.5.0 released

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Peter Skinner
Posts: 1763
Joined: Sun Feb 26, 2006 1:49 pm
Location: Edmonton, Alberta, Canada
Full name: Peter Skinner

Re: XBoard 4.5.0 released

Post by Peter Skinner »

hgm wrote:It seems indeed that this release is defective for WinBoard in several ways:

*) The history.c file is missing from the release tar ball.
*) The file winboard/wsettings.c is corrupted by inclusion of a wrong patch, which does not belong in this branch. It should be replaced by the version from before the "-reset" commit.

With these two changes I can compile it with gcc under Cygwin. Don't know if this solves most of the MSVC problems.
Can you provide a new tar ball of the source with the corrections?
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard 4.5.0 released

Post by hgm »

I guess you can get that from the GNU git repository by downloading the snapshot from just before the commit that spoiled it:

http://git.savannah.gnu.org/cgit/xboard ... 1ce6e0ff70

The git snapshots do contain the history.c.
User avatar
Peter Skinner
Posts: 1763
Joined: Sun Feb 26, 2006 1:49 pm
Location: Edmonton, Alberta, Canada
Full name: Peter Skinner

Re: XBoard 4.5.0 released

Post by Peter Skinner »

hgm wrote:I guess you can get that from the GNU git repository by downloading the snapshot from just before the commit that spoiled it:

http://git.savannah.gnu.org/cgit/xboard ... 1ce6e0ff70

The git snapshots do contain the history.c.
I get the following error:

c1 : fatal error C1083: Cannot open source file: 'parser.c': No such file or directory

parser.c is in the main xboard folder, not the Winboard folder. When I move it to the Winboard folder, I get an error of duplicate source.

This seems to be the last issue before it will compile.
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
Dann Corbit
Posts: 12542
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: XBoard 4.5.0 released

Post by Dann Corbit »

Trying to build a 64 bit version, I get the following errors:
1>------ Build started: Project: winboard, Configuration: Release x64 ------
1>help.obj : error LNK2019: unresolved external symbol snprintf referenced in function HtmlHelp
1>whistory.obj : error LNK2019: unresolved external symbol FindMoveByCharIndex referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol MemoContentUpdated referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol RefreshMemoContent referenced in function HistoryDialogProc
1>winboard.obj : error LNK2019: unresolved external symbol MoveHistorySet referenced in function HistorySet
1>wsettings.obj : error LNK2019: unresolved external symbol ClearOptions referenced in function SettingsProc
1>.\Release\winboard.exe : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Dann Corbit
Posts: 12542
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: XBoard 4.5.0 released

Post by Dann Corbit »

Dann Corbit wrote:Trying to build a 64 bit version, I get the following errors:
1>------ Build started: Project: winboard, Configuration: Release x64 ------
1>help.obj : error LNK2019: unresolved external symbol snprintf referenced in function HtmlHelp
1>whistory.obj : error LNK2019: unresolved external symbol FindMoveByCharIndex referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol MemoContentUpdated referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol RefreshMemoContent referenced in function HistoryDialogProc
1>winboard.obj : error LNK2019: unresolved external symbol MoveHistorySet referenced in function HistorySet
1>wsettings.obj : error LNK2019: unresolved external symbol ClearOptions referenced in function SettingsProc
1>.\Release\winboard.exe : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
After re-pulling from git, I now have one unresolved external:
1>------ Build started: Project: winboard, Configuration: Release x64 ------
1>help.obj : error LNK2019: unresolved external symbol snprintf referenced in function HtmlHelp
1>wsettings.obj : error LNK2019: unresolved external symbol ClearOptions referenced in function SettingsProc
1>.\Release\winboard.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

C:\pgn\winboard-engines\xboard-4.5.0\winboard\wsettings.c:
ClearOptions(activeCps);
Dann Corbit
Posts: 12542
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: XBoard 4.5.0 released

Post by Dann Corbit »

By commenting out ClearOptions() I was able to make a version that compiles and runs. Of course, I won't be able to clear options until that code becomes available.
CThinker
Posts: 388
Joined: Wed Mar 08, 2006 10:08 pm

Re: XBoard 4.5.0 released

Post by CThinker »

Dann Corbit wrote:
Dann Corbit wrote:Trying to build a 64 bit version, I get the following errors:
1>------ Build started: Project: winboard, Configuration: Release x64 ------
1>help.obj : error LNK2019: unresolved external symbol snprintf referenced in function HtmlHelp
1>whistory.obj : error LNK2019: unresolved external symbol FindMoveByCharIndex referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol MemoContentUpdated referenced in function HistoryDialogProc
1>whistory.obj : error LNK2019: unresolved external symbol RefreshMemoContent referenced in function HistoryDialogProc
1>winboard.obj : error LNK2019: unresolved external symbol MoveHistorySet referenced in function HistorySet
1>wsettings.obj : error LNK2019: unresolved external symbol ClearOptions referenced in function SettingsProc
1>.\Release\winboard.exe : fatal error LNK1120: 6 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
After re-pulling from git, I now have one unresolved external:
1>------ Build started: Project: winboard, Configuration: Release x64 ------
1>help.obj : error LNK2019: unresolved external symbol snprintf referenced in function HtmlHelp
1>wsettings.obj : error LNK2019: unresolved external symbol ClearOptions referenced in function SettingsProc
1>.\Release\winboard.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

C:\pgn\winboard-engines\xboard-4.5.0\winboard\wsettings.c:
ClearOptions(activeCps);
I am able to build the 64-bit project correctly using VS2008 and VS2010.

I had to do these:
1. I had to change all calls to SetWindowLong/GetWindowLong with SetWindowLongPtr/GetWindowLongPtr and correct the parameters.
2. Disable the generation of manifests.
3. Change snprintf to _snprintf in help.c.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard 4.5.0 released

Post by hgm »

That is really weird: we use snprintf all over the place. How could it not be accepted in help.c, while it is OK in zillions of other places? Is the help.c somehow compiled with a wrong mode for translating C symbols into assembler labels?
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: XBoard 4.5.0 released

Post by hgm »

CThinker wrote:I am able to build the 64-bit project correctly using VS2008 and VS2010.
Oh, I notice only now that you are building this as 64-bit application. The results of that are essentially undefined.

Beware that there are many places in the code where an #ifdef _WIN32 or #ifdef WIN32 is used to make the distinction between code that should be used for Windows and Linux. So be sure these symbols are defined in a 64-bit compile.
CThinker
Posts: 388
Joined: Wed Mar 08, 2006 10:08 pm

Re: XBoard 4.5.0 released

Post by CThinker »

hgm wrote:That is really weird: we use snprintf all over the place. How could it not be accepted in help.c, while it is OK in zillions of other places? Is the help.c somehow compiled with a wrong mode for translating C symbols into assembler labels?
Because in your config.h, this is defined:

Code: Select all

#ifdef _MSC_VER
#define snprintf _snprintf
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#endif
However, config.h is not included by help.c.