1

Windows 8.1 で Free Pascal 2.6.4 32 ビットを使用しています。TFileStream を使用してファイルをコピーしたいと考えています。

program copy;

procedure CopyFile (strFilename : string);
var
   SourceF, DestF :  TFileStream;
begin
end;
begin
   writeln('starting ');

end.

コンパイラが TFileStream を認識していません。

fpc copy_small.pas
Free Pascal Compiler version 2.6.4 [2014/03/06] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling copy_small.pas
copy_small.pas(5,33) Error: Identifier not found "TFileStream"
copy_small.pas(5,33) Error: Error in type definition
copy_small.pas(12) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\2.6.4\bin\i386-Win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)

TFileStream を使用して Web で見つけたサンプル コードには、「uses」句がありませんでした。Free Pascal で TFileStream を使用するために、コマンド ラインで設定したり、プログラムに含めたりする必要があるものはありますか?

4

1 に答える 1