If you install new components frequently, you've
probably run in to situations where Delphi is unable to
build the components library file -- CMPLIB32.DCL -- due to an
error occurred compiling certain components. Most of the
time, you'll be able to solve the problem by exiting
Delphi, removing the problematic components and
rebuilding the components library. If for some reason
you're unable to rebuild this file, you have following
Look for a file called CMPLIB32.~DC
in the same directory where you'd normally find CMPLIB32.DCL. By
default, this would be in "C:\Program
(backup of the last good compile of the
components library) to CMPLIB32.DCL.
Restart Delphi and open the recovered CMPLIB32.DCL
using "Component |
Open Library..." menu option.
If you can't find the CMPLIB32.~DC,
most likely your last option is to copy the CMPLIB32.DCL file that
came with your Delphi install disk(s). Once you retrieve
the original components file, you must reinstall
components that you had installed since the original
installation of Delphi.
f : TextFile;begin
AssignFile( f, 'LPT1' );
Rewrite( f );//
// do your printing here...
WriteLn( f, 'hello, world!');
CloseFile( f );end;