[fpc-pascal]PPAS.BAT and directory paths with spaces in them

Rich Pasco pasco at acm.org
Fri May 4 19:30:19 CEST 2001

Can anyone enlighten me as to the origin of PPAS.BAT ?

I'm using the released Free Pascal version 1.0.4 under Windows NT 4.0,
compiling for a Win32 target.  I use the stand-alone PPC386 compiler.

If source filename on the PPC386 command line includes a path with
spaces in it, then the linker fails and leaves file PPAS.BAT on my
disk.  For example, the command line,

  ppc386 "D:\memos\rich pasco\gentable.pas"

results in the output:

  Free Pascal Compiler version 1.0.4 [2000/12/30] for i386
  Copyright (c) 1993-2000 by Florian Klaempfl
  Target OS: Win32 for i386
  Compiling d:\memos\rich pasco\gentable.pas
  Linking d:\memos\rich pasco\gentable.exe
  -: cannot open pasco\gentable.exe: No such file or directory
  gentable.pas(47,1) Warning: Error while linking
  Closing script ppas.bat
  47 Lines compiled, 0.5 sec

The linker graciously leaves PPAS.BAT on my disk for inspection.
A copy appears below.  It seems obvious that the bug is in the
fourth line: On the ldw command line, the output executable file
name should have quotes around it.

In order to fix PPAS.BAT I need to know where it came from.

     - Rich

--------------------- begin PPAS.BAT -----------------------------
@echo off
SET THEFILE=d:\memos\rich pasco\gentable.exe
echo Linking %THEFILE%
d:\pp\bin\win32\ldw.exe  -s   -b base.$$$ -o d:\memos\rich pasco\gentable.exe link.res
if errorlevel 1 goto linkend
goto end
echo An error occured while assembling %THEFILE%
goto end
echo An error occured while linking %THEFILE%
---------------------- end PPAS.BAT ------------------------------

More information about the fpc-pascal mailing list