Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


components compiling error

Posted on 1997-08-05
Medium Priority
Last Modified: 2010-04-04

when i'm compiling a component in delphi 2.01, I very often get this message:   'error with compiling cmplib32.dpr cannot find wintypes.pas' or sometimes 'winprocs.pas' and another window giving 'cannot open cmplib32.dpr'.
That last one I solved with checking the option 'save source' in the 'options, library' tab. But here is the strange thing I now the component should compile without problems, it did before, and after reinstalling delphi it doesn't. and when my component library gets over 1.80Mb I cannot add another component anymore because of above problems. This is starting to get annoying to say the least. I reinstalled delphi 6 times already and always the same results. What is going on?? It should compile without problems, but it doesn't why?
Question by:hellfire052497
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 1340523

the error message "error with compiling cmplib32.dpr cannot find wintypes.pas" or sometimes "winprocs" occures when the pseudonyms are not defined for using WINDOWS.PAS instead of WINTYPES.PAS and WINPROCS.PAS, like Delphi 1.x needed this. - it looks like you are using Delphi 1.x components within Delphi 2.x ???

Reinstalling Delphi is not a good solution under Windows95, because you should first DEINSTALL it and then REINSTALL it. Otherwise the installation routines find out, that you've Delphi allready installed, copies only the files and don't change any registry-entries which are very important for each Windows95 application and Delphi too.

Do you install component-unit .PAS files??

Delphi has problems with large source-projects. try to compile each unit first and then build the new component-library.

Hope, any of these ideas help.

Accepted Solution

StevenB earned 640 total points
ID: 1340524
 The problem you are experiencing is related to the length of the search path. There is a bug in D2 which causes all sorts of problems if this string excedes 512 characters in length. The solution is to put all your components into one directory, just off the root, thus keeping the search path short. I'm sure this will solve your problems.


Expert Comment

ID: 1340525
Socrates asked basically this question some time back. Here is the thread for your perusal. I recall that subsequently he issued a statement on EE warning everybody about this bug. It is quite significant and I echo his warnings.

Here's the PAQ:

Title: "Installing Components"
       Value: 8 Points
                     When Delphi is first installed on my machine everything runs smoothly. When I Install a new
                   component on the VCL there are no problems, until:

                     Without warning a component refuses to install for no apparent reason and I am given the
                   explanation by Delphi:

                     Fatal Error: C:\program files\borland\delphi2.0\bin\cmplib32.dpr(79): File not found:

                     After this event has occured, just about any subsequent attempt to install a component results
                   in the same problem, even those that have successfully installed on previous Delphi Instalations.
                   The only solution I have found to this problem is to uninstall Delphi and then reinstall it and all
                   my components. This is VERY boring and time consuming.

                     My question is: Is this a known bug? What is 'WinTypes.pas' and why does it never seem to
                   exist on my machine, yet appears in uses clauses? and most importantly
                     Is there a better fix, or do I have to keep reinstalling Delphi?

                     Help Me Please, Socrates.

        Answer from flisakow...
                   Okay, here it is.

  Question history:

       Rejected Answer from
                          In Delphi 1, the WINDOWS.PAS unit was split into WINTYPES and WINPROCS. The component you're installing doesn't have
                          conditional compilation built-in to support the different Delphi versions. You can get around this by setting Aliases in your Project
                          Options dialog. On the Directories/Conditionals tab (I'm using D3, I think it had the same name in D2) add the following to the Aliases


                          That should take care of it. Beware of poorly written components out there.
       Comment from Socrates...
                            Thanks for the advice, but the problem seems to persist, even when the aliases are set. The problem doesn't seem to be specific to
                          certain components, rather something thet Delphi (V2.0) is experiencing. I'd presume that it was just my machine, but two people in my
                          office have suffered heavily from it.
                            In that the file 'WinTypes.pas' still cannot be found, when the alias WinTypes=Windows exist, what else might the problem be? My
                          suspicions are that the CompLib32.dpr file is becoming hopelessly corupted, does this sound plausible?

       Comment from brittain...
                          Hmmm. Couple questions:

                          1. Does D2 work fine without installing any other components?

                          2. Are you using a shared network install of D2? (Doesn't seem likely from your message, but...)

                          3. Is your environment PATHing right? Particularly your Search Path and Library Path?

                          As for the CompLib32.DPR becoming corrupted, I've heard of it happening (not to me), but doubtful after a fresh install and on multiple
       Comment from Socrates...
                            AAAAAAAARRRRRRRRGGGGGGGHHHHHHHHH, its just done it again.

                            OK, in answer to your questions:

                            1) Yes, it seems to, allthough It's hard to say, because my current project requires that I install about 10 components (mostly my own
                          [perfectly written]).

                            2) No.

                            3) Yes, (when you remove a component form the dialog, it does not remove it from the search path, you have to do it manually).

                            I've just installed my own component, inherited from a TPanel, and with NOTHING extra, no methods, no properties, just:

                            TPanelDerived = class(TPanel)

                            And the same thing happened, Delphi is messing around with my sanity. Now nothing else will install, and I'm forced to reinstall
                          delphi (5 times in three days, including Reinstalling Windows once).

                            Am I really the only person to experience this problem? Have I upset some God, who is seeking retribution? Do I have a messed up
                          copy of Delphi? Does this problem stop occuring when my new version of Delphi3 arrives on Monday?

                            If you think you have any answers, then I'm eager to hear them. Admittedly my question did appear to be solvable by setting the
                          aliases, but I'd already checked that. I figured that since this problem occurs to me so frequently that someone else must have
                          experienced it. For that reason, I'm going to reject your answer now so that if anyone else has experienced my problem, they can answer
                          the question. If no one has done so in about a week or so then I'll invite you to re-answer the question, so that I can grade you. Thanks
                          for your help, please interpet this rejection as indication of my deseration for an answer, rather than a reflection of my opinion on your
                          assistance, and if you have any new ideas in the next week then PLEASE let me know.

                            Cheers, Socrates.
       Comment from brittain...
                          No offense taken.

                          D3 handles component installation very differently. Rather than compiling your components into a single library you can add them in as
                          packages (which can be both runtime or design time). Since you use so many third party components (note: many of which may need to
                          be updated) I recommend you take a good long look at the docs on Packages before proceeding.

       Comment from chrb...
                          Sometimes I also got that problem, it seems like there is to many installed components. When I uninstall some other components it
                          works fine.

       Comment from flisakow...

                          I remember reading somewhere that Delphi didn't like it if the search path got too long. Try making a single lib directory for all the new

       Comment from chrb...
                          With me it happend when the searchpath got to long, so I think you have right :)
       Comment from StevenB...
                            I concur with the above comments. The same problem haunted me for months. I stumbled on the solution accidentally. It seems to me
                          that if the search path excedes 512 characters then things collapse exactly as you've described. Try putting all your components in one
                          directory to reduce your search path length.

       Comment from Socrates...
                            You all have my eternal gratitude, this solution seems to have worked. My only problem now is who to grade. After some deliberation
                          I have decided that 'flisakow' probably was the first to suggest the answer, namely the search path length. If they'd like to submit an
                          answer, then they will be duely rewarded.

                            THANKS to everyone who contributed, Socrates.
       Accepted Answer from
                          Okay, here it is.
       Comment from Socrates...
                          Sorry that took me so long. Heres your points.



Author Comment

ID: 1340526
Thanks for the explanation, and adding the answer for Socrates, it helps. AH well a seventh clean install, and a single root component directory, so be it.. and thanks you deserve the points

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question