Solved

Installing Components

Posted on 1997-06-10
12
259 Views
Last Modified: 2010-04-06
 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: 'WinTypes.pas'.

  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.
0
Comment
Question by:Socrates050697
  • 4
  • 3
  • 2
  • +2
12 Comments
 

Expert Comment

by:brittain
ID: 1336916
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 combobox:

WinTypes=Windows;WinProcs=Windows;

That should take care of it.  Beware of poorly written components out there.
0
 
LVL 1

Author Comment

by:Socrates050697
ID: 1336917
 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?

  Socrates.

0
 

Expert Comment

by:brittain
ID: 1336918
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 machines.
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 1

Author Comment

by:Socrates050697
ID: 1336919
 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)
  end;

  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.
0
 

Expert Comment

by:brittain
ID: 1336920
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.

Scott
0
 

Expert Comment

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

Chr
0
 
LVL 1

Expert Comment

by:flisakow
ID: 1336922

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 components.  

Shaun
0
 

Expert Comment

by:chrb
ID: 1336923
With me it happend when the searchpath got to long, so I think you have right :)
0
 
LVL 4

Expert Comment

by:StevenB
ID: 1336924
 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.

  Steven.
0
 
LVL 1

Author Comment

by:Socrates050697
ID: 1336925
 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.
0
 
LVL 1

Accepted Solution

by:
flisakow earned 80 total points
ID: 1336926
Okay, here it is.

0
 
LVL 1

Author Comment

by:Socrates050697
ID: 1336927
Sorry that took me so long. Heres your points.

Socrates
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
build html 5 client that connect to indy Tidtcpserver 3 400
delphi prevent click fast 2 219
Best Firemonkey component pack 1 105
Convert GUI app into console app for Win32 Env 5 100
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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