Hi,
 
Regarding my problem with the linker not able to open crt0.o: it is solved. But oh, to get the system working!
 
Peter Gerwinski wrote me:
 
>Not being a CygWin32 expert I can only recommend to double-check whether
>you have installed the corresponding (beta-??) version of CygWin32 for
>your version of GPC.  It must contain `crt0.o'.
>
>Hope this helps, :-/

It did indeed. I had installed the beta 18 version of Cygwin32(it was compatible with 17.1, so I could use it with the GPCWIN version for 17.1), but only the usertools. After I installed the  complete C development kit, it worked. That is to say, after a while. It proved rather difficult to let the compiler and the linker both find the files they needed. The environment variables mentioned in GPC.HLP did nothing. I had to point the environment variabele GCC_EXEC_PREFIX to the Cygwin32 directory containing crt0.o, to use the -B (directory for binaries) and -L (directory for libraries) switches on the GPC command line, and to point the DOS path to the compiler itself and to the Cygwin32 binaries (assembler and linker). The make files I had to adjust accordingly. But after some hours of experimenting it worked as it should do!
 
My setup batch file for the new version working with Cygwin32 b18 is now as follows (assuming I installed Gpcwin32 in c:\gpcwin32):
 
set GPC_EXEC_PREFIX=c:\gpcwin32\lib\gcc-lib\i386-cygwin32\2.7.2.1\
set GCC_EXEC_PREFIX=c:\gpcwin32\lib\
set PATH=%PATH%;c:\gpcwin32\bin
 
and I use the following command line:
 
gpc -B%GPC_EXEC_PREFIX% -L%GPC_EXEC_PREFIX%
 
(well, I use a 4DOS alias instead, that's easier!)
 
As regards makefiles, this is now my makefile for the Borland_Pascal test sources (without the comments):
 
#--------------------------------------------------------------------
# c:\bin\sh.exe must exist!
.SUFFIXES: .p .pas .o .h
 
.pas.o:
 $(PC) -c $(DIRFLAGS) $(ALLPFLAGS) -o $@ $<
 
PC = gpc
DIRFLAGS = -B$(subst \,\\,$(GPC_EXEC_PREFIX)) -L$(subst \,\\,$(GPC_EXEC_PREFIX))
ALLPFLAGS = $(PFLAGS) -g -O3 --automake="$(DIRFLAGS) -g -O3"
EXE = .exe
 
TESTS = abso$(EXE) asmnames$(EXE) bitmanip$(EXE) caseelse$(EXE)  \
 cstparam$(EXE) head$(EXE) incdec$(EXE) kohl$(EXE) \
 mem$(EXE) minimax$(EXE) nohead$(EXE) objects$(EXE)  \
 openarr$(EXE) switches$(EXE) varrec$(EXE) voidparm$(EXE)
 
TESTSRC = head.pas nohead.pas cstparam.pas caseelse.pas switches.pas \
 bitmanip.pas incdec.pas minimax.pas mem.pas abso.pas  \
 asmnames.pas openarr.pas varrec.pas voidparm.pas
 
all: bptest
 
bptest:
 for x in $(TESTSRC) ; do \
   rm -f a.out 2>/dev/null ; \
   $(PC) $(ALLPFLAGS) $$x 2>/dev/null ; \
   echo -n "$$x: " ; \
   if [ -f "a.out" ] ; then ./a.out ; else echo "failed" ; fi ; \
 done ; \
 rm myunit.o myunit.gpi a.out 2>/dev/null ;
 
# DOS can't run shell script
dostest: $(TESTS)
 
clean:
 -rm -f $(TESTS)
 -rm -f *.o *.gpi *.gpc
 
distclean: clean
 -rm -f *~ core a.out #* *.BAK *.bak *.orig
 
# empty
install:
 
abso$(EXE): abso.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
asmnames$(EXE): asmnames.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
bitmanip$(EXE): bitmanip.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
caseelse$(EXE): caseelse.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
cstparam$(EXE): cstparam.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
head$(EXE): head.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
incdec$(EXE): incdec.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
#iso$(EXE): iso.pas
# $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
# strip $@
# :-)
kohl$(EXE): kohl.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
mem$(EXE): mem.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
minimax$(EXE): minimax.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
nohead$(EXE): nohead.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
objects$(EXE): objects.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
openarr$(EXE): openarr.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
switches$(EXE): switches.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
varrec$(EXE): varrec.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
voidparm$(EXE): voidparm.pas
 $(PC) $(DIRFLAGS) $(ALLPFLAGS)  -o $@ $<
 strip $@
#--------------------------------------------------------------------
 
A rule for making voidparm.exe had to be added, and I could run it with the command
 
make dostest
 
as Maurice Lombardi pointed out to me.
 
I commented out iso.pas, because it gave errors:
 
iso.pas: In function `program_Iso':
iso.pas:13: parse error before `Operator'
iso.pas:13: comma missing after identifier `Uses'
iso.pas:13: parse error before `Shl'
iso.pas:13: comma missing after identifier `Uses'
iso.pas:13: parse error before `;'
iso.pas:14: comma missing after identifier `Uses'
iso.pas:14: pointer domain type undefined
iso.pas:14: parse error before `Uses'
iso.pas:14: comma missing after identifier `Uses'
iso.pas:14: parse error before `Value'
iso.pas:14: comma missing after identifier `Uses'
iso.pas:14: parse error before `Absolute'
iso.pas:21: comma missing after identifier `Uses'
iso.pas:21: parse error before `('
iso.pas:21: comma missing after identifier `Uses'
iso.pas:21: parse error before `Operator'
iso.pas:21: extra comma following id_list
That was not the case in GPC for Cygwin32 b17.1. Harakiri.pas in test\misc gave errors as well:
 
harakiri.pas: In function `Paramstr':
harakiri.pas:40: condition must be of Boolean type
harakiri.pas: In function `Atoi':
harakiri.pas:54: warning: cast to type of different size
harakiri.pas:54: invalid lvalue in address expression
and that was also not the case in the previous version of GPC.
 
Till so far I didn't try the DLL demo.
 
Kind regards,
Hans Lunsing
Leiden, The Netherlands,
e-mail jlunsing@doge.nl