freepascal - How to eliminate Free Pascal 'not recognized' compile error on TFileStream? -


i using free pascal 2.6.4 32-bit on windows 8.1. want use tfilestream copy file.

program copy;  procedure copyfile (strfilename : string); var    sourcef, destf :  tfilestream; begin end; begin    writeln('starting ');  end. 

the compiler not recognizing tfilestream:

fpc copy_small.pas free pascal compiler version 2.6.4 [2014/03/06] i386 copyright (c) 1993-2014 florian klaempfl , others target os: win32 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 2 errors compiling module, stopping fatal: compilation aborted error: c:\fpc\2.6.4\bin\i386-win32\ppc386.exe returned error exitcode (normal if did not specify source file compiled) 

the sample code found on web using tfilestream did not have "uses" clause. there needs set on command line or included in program in order use tfilestream free pascal?

tfilestream lives in classes unit, code should be

program copy;  // use 'non-system' functionality add necessary units here uses   classes;  procedure copyfile (strfilename : string); var    sourcef, destf :  tfilestream; begin end; begin    writeln('starting ');  end. 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -