Building Winboard 4.3.14
--------------------------------
I download the source files from the link
http://www.open-aurec.com/wbforum/WinBo ... 4.3.14.zip
and uncompress it. As i try to run the compilation inside the winboard directory of the xboard14 directory, i copy (not cut) the following files to winboard directory from its parent directory xboard14:
Every header that were not in winboard directory: acconfig, backend, backendz, childio, common, frontend, list, moves, parser, xboard, xedittags, xgamelist,xhistory,zippy. I dont find any problem doing this operation, no .h file was trying to overwrite himself.
The following .c files (as i was told by H.G.Muller): backend.c, gamelist.c, lists.c, moves.c, parser.c, pgntags.c, uci.c, zippy.c.
Once all this files are copyed to the directory “winboard” inside xboard14, i try to run the .mak file in cygwin:
- Code: Select all
make -f cygwin.mak
but i get the declaration error, so i go to the 5444 line in backend.c and write the following line:
- Code: Select all
int NrW=0, bare=0,NrPiece=0;
try another time to run make and get the following error:
- Code: Select all
/bin/sh: /c/program files/help workshop/hcrtf.exe: No such file or directory
make: *** [winboard.hlp] Error 127
which acording to H.G.Muller is because i dont have some program for the help files.
So then i try to use the method in readme.txt in winboard directory, which i copy here:
- Code: Select all
flex -oparser.o -L parser.l
windres --use-temp-file --include-dir . winboard.rc -O coff -o wbres.o
gcc -O2 -mno-cygwin -mwindows -c *.c
gcc -mno-cygwin -mwindows *.o -lwsock32 -lwinmm -o winboard.exe
strip winboard.exe
rm *.o
i omit the first one because i already have parser.c
In the second one i get an error because there is no “sounds\ding1.wav”, but as when invoking make -f cygwin.mak there was the same exact instruction working but with .. instead of a lone ., i use the changed instruction
- Code: Select all
windres --use-temp-file --include-dir .. winboard.rc -O coff -o wbres.o
which works. With the 3th order i get a ton of errors, i just copy some of the first errors:
- Code: Select all
In file included from gamelist.c:26:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
In file included from lists.c:29:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
In file included from moves.c:51:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
In file included from parser.c:11:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
In file included from pgntags.c:29:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:393: error: redefinition of 'putchar'
In file included from uci.c:26:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-
As it seems that im more inteligent that what i thought, and i saw no way around, i tried to look at the cygwin.mak to delete all this crap about the help file
I commented the lines:
- Code: Select all
# Update the help file if necessary
#$(proj).hlp : $(proj).rtf
# $(HC) $(proj).hpj
# cat $(proj).err
where the last three # are mine. Unfortunately, i needed the file winboard.hlp for the compilation. I got it downloading the built version and pasting this file to my winboard directory
But there were tons of .c files missing in the cygwin.mak file, so i needed to actualize it to include every .c that was in my winboard directory. I dont have a copy of the previous .mak, but after i touch it, the cygwin.mak looks like this:
- Code: Select all
allobj= winboard.o backend.o parser.o moves.o lists.o \
gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \
wsockerr.o wbres.o wclipbrd.o woptions.o uci.o \
wengineoutput.o wlayout.o wplugin.o wsnap.o \
whistory.o wevalgraph.o
dotc= winboard.c backend.c parser.c moves.c lists.c \
gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \
wsockerr.c winboard.rc wclipbrd.c woptions.c uci.c \
wengineoutput.c wlayout.c wplugin.c wsnap.c \
whistory.c wevalgraph.c
were what i did was to put every .c i had in that list, and the corresponding .o in the allobj list
And guess what.... It worked!!!
So for today, i'm done. I can't believe i could change all this myself, as half of the time i had no idea what i was doing... Indeed i open a .odt file to keep track of everything that i did (and is what ur reading now) because i thought that it wont work and i wanted a detailed explanation on how to do it propperly.
PS: highlight of what i did:
1- copy every .h file from xboard to winboard directory.
2- copy the following .c files from xboadr to winboard directory: backend.c, gamelist.c, lists.c, moves.c, parser.c, pgntags.c, uci.c, zippy.c.
3- Change backend.c file so it can compile -> go to line 5443, create a new line (which will be 5444) and add:
- Code: Select all
int NrW=0, bare=0,NrPiece=0;
4- Download the built winboard and copy and paste the file winboard.hlp to your current winboard directory.
5- Comment the lines of cygwin that try to make this help file (which anyway is OBSOLET): U will need to add three # so it will look like this after ur change:
- Code: Select all
# Update the help file if necessary
#$(proj).hlp : $(proj).rtf
# $(HC) $(proj).hpj
# cat $(proj).err
6- Add every .c missing in lines 11-17 of the cygwin.mak so it will look like this (u will have now more lines now):
- Code: Select all
allobj= winboard.o backend.o parser.o moves.o lists.o \
gamelist.o pgntags.o wedittags.o wgamelist.o zippy.o \
wsockerr.o wbres.o wclipbrd.o woptions.o uci.o \
wengineoutput.o wlayout.o wplugin.o wsnap.o \
whistory.o wevalgraph.o
dotc= winboard.c backend.c parser.c moves.c lists.c \
gamelist.c pgntags.c wedittags.c wgamelist.c zippy.c \
wsockerr.c winboard.rc wclipbrd.c woptions.c uci.c \
wengineoutput.c wlayout.c wplugin.c wsnap.c \
whistory.c wevalgraph.c
And it built