Recently I tried to install these same components on a windows 95 machine.
When the component library tries to compile, I recieve the following error:
"can not open cmplib32.dcl error 1157"
any suggestions?
the typical cause of something like this error is a badly programmed
component that uses an external DLL and links to it via external
statements. This way the link is required at comlib load and if the DLL is
not found the while load process fails. Components should *always* link
dynamically (LoadLIbrary, GetProcAddress) to non-system DLLs. That way they
can handle failures more sensibly.
Peter Below (TeamB) 10011...@compuserve.com)
Can’t load [complib.dcl,cmplib32.dcl,vcl30.dpl]
Possible Cause of Error
1. You may have moved or deleted the complib.dcl file.
2. The Delphi VCL may have become corrupted due to changes you made to the VCL
source code.
3. You may have unsuccessfully attempted to install a component into your VCL.
Quick Fix
Note: The following are the file names and default locations for the various
versions of Delphi:
Delphi 1: complib.dcl in C:\Borland\Delphi\BIN
Delphi 2: cmplib32.dcl in C:\Program Files\Borland\Delphi 2\BIN
Delphi 3: vcl30.dpl in C:\Windows\System
1. Check to ensure that your component library file resides in the appropriate
location based on your version of Delphi. If you find the file elsewhere, move
it to the expected location given above and attempt to rebuild the library
(Delphi 1 and 2) or package (Delphi 3) again. If the file already is in the
correct location but you receive this error message anyway, follow these
steps:
A) Make a backup copy of the file (complib.dcl, complib32.dcl, or vcl30.dpl)
and store it in a safe place
B) Delete the "original" copy of the file you just backed up
C) If you had previously made changes to the file, Delphi will have created a
backup of the file prior to recompilation, replacing the first letter of the
extension with a tilde (~) and truncating the last letter of the extension. In
Delphi 1, this file is complib.~dc. In Delphi 2, it is complib32.~dc. If you
have the file appropriate to your version of Delphi on your system, you can
rename the file as complib.dcl or complib32.dcl (as appropriate for your
version of Delphi) and restore it to its former exalted position as Delphi’s
component library file. If you had not made previous changes to the file, or
the backup file no longer exists, copy the file from the Delphi CD to the
location appropriate for your version of Delphi.
Note: In Delphi 3, you should not attempt to modify this file. When you add
components, install them into the dclusr package or a new package you create.
If you need to reinstall vcl30.dpl, copy it from the Delphi CD to the
C:\Windows\System directory.
Note: You will have to reinstall all the components you added to your
component library file if you restore from the CD, but if you do not have an
older version of the file, this is your only recourse.
D) Rebuild the component library.
3. Follow steps A - D above to reinstall the last good copy of the VCL.
Additional Information
In Delphi 1, the component library’s filename was named complib.dcl. Its size
was 1,036 KB.
In Delphi 2, the component library file was renamed cmplib32.dcl. Its size was
4,636 KB.
In Delphi 3, there are no files with a .dcl extension. Instead of one single
unit containing the entire VCL, several packages consisting of related
components are provided. The "main" package, which contains the most common
components and units you will need for a typical Delphi project, are contained
in vcl30.dpl. Its size is 1,257 KB. There are approximately 25 .dpl files in a
full installation of Delphi 3.
Note: Other things that may pose a problem are not having enough virtual
memory, which may be due to a lack of sufficent RAM and/or hard disk space, or
a fragmented hard drive. Ensure that virtual memory is set up correctly on
your system*. Purchase more RAM if possible. Leave at least 10% of your hard
drive free. Defrag the hard drive if it needs it. If all else fails, uninstall
and then reinstall Delphi. Don’t forget to (re)install any appropriate patches
for your version of Delphi. To get the latest patches, visit Borland’s web
site at http://www.borland.com
*If you seem to be having problems with virtual memory settings, you can allow
Windows to automatically adjust virtual memory for you by following these
steps:
1. Select Start | Settings | Control Panel
2. Double-click the System icon
3. Select the Performance Page
4. Select the Virtual Memory button
5. Check the "Let Windows manage my virtual memory settings" radio button.
Note: The extension for the component library file has changed from .dcl
(Delphi Component Library) in Delphi 1 and Delphi 2 to .dpl (Delphi Package
Library) in Delphi 3.
Clay Shannon,
author of the upcoming book "Troubleshooting Delphi - Quick Tips"
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
I answered my own question.
If a component accesses an external DLL, and that DLL is not within a
search path of the physical PC. Delphi can not open the cmplib32.dcl.
Naturally error code 1157 tells me that right away. How could I be so
stupid.
P.S. are delphi error codes documented anywhere?
Jim Smerz <jim....@midata.com> wrote in article
<01bd3324$d97059a0$6b37007b@it006-smerz-j>...
Peter Below (TeamB) 10011...@compuserve.com)