Solved

Upgrading Delphi6 to Delphi7 - rtl60.bpl error

Posted on 2004-08-19
13
3,017 Views
Last Modified: 2012-08-13
Hi,

I am frustrated and tired of trying. I am upgrading code for an application written in Delphi6 to Delphi7. Everything compiles fine and the application runs fine but as soon as it tries to run a package I get an error:

"The application has failed to start because rtl60.bpl was not found. Re-installing the application may fix this problem."

Then it throws an access violation and says unable to load "PACKAGE NAME " package.

The application heavily relies on packages, rather is made up of packages. I have tried following:
1. checked all the  library paths
2. deleted all the dpc and dcu files before rebuilding the delphi6 code in Delphi7.
3. Rebuild all the third party packages (ones I had the source code for)
4. Searched for rtl60.bpl on the hard disk (Didnt find any)

Following piece of code throws the message:

function TForm1.RunDLLForm(aName: ShortString; aControl: TWinControl): Boolean;
var
  aPackageRegItem: TPackageRegItem;
  iFound: Integer;
begin
  Result := False;

  aPackageRegItem  := PackageRegister.Find(aName);
  if not (aPackageRegItem.AccessLevel = lNone) then
  begin
    libHandle := LoadPackage(aPackageRegItem.Filename); //ERROR HERR..
  end;

Please help.

Thanks

Pro2003
0
Comment
Question by:pro2003
13 Comments
 
LVL 3

Expert Comment

by:KyleyHarris
ID: 11848736
You cannot use rtl60.bpl for D7 apps. in the projects options on the packages tab you will have ticked "use runtime packages"
if you are porting an app it is not going to replace rtl60.bpl with rtl70.bpl in your list. you need to change all the used packages yourself
0
 
LVL 2

Expert Comment

by:DarkCore_
ID: 11849768
Open your Package and Delete the "Requires" rtl and vcl ... then Build your package again in Delphi 7.

Edu
0
 

Author Comment

by:pro2003
ID: 11852888
Okay, I opened up every single package and removed vcl, rtl from the requires clause. Still no go..
Any ideas. I went through all the projects and opened each one of them as well. I am not sure whats going on.

I am increasing the points for this question to 150.
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 11855552
check in your Delphi menu Project, Options, Packages, in the section "Build with runtime packages" check if you have rtl60 and remove it
0
 

Author Comment

by:pro2003
ID: 11855595
I have already done that. I am not building the packages or the project with the run time packages. I do see rtl and vcl there but its not checked and GRAYED OUT.

and Oh I am using Delphi 7 Professional, could this be a part of the problem

Thanks.


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:KyleyHarris
ID: 11856466
Search you path for invalid bpls ie c:\;c:\windows;c:\windows\system32. You may be recompiling with all the best intentions and the application could be attempting to load the wrong one.

how do you name your packages.

I follow delphi style

is MYPac.bpl would be

MyPAC50.bpl
MyPAC60.bpl
MyPAC70.bpl

this way they all reside in system locations happily and do not corrupt different programs that share them. ie if you still have a d5 app relying on it.

hope this helps
0
 

Author Comment

by:pro2003
ID: 11891857
Okay I tried that. I recompiled all the packages and complete project I just have delphi 7 professional installed on my machine. I still get the same error.

Is there a way I can check what rtl is it trying to look for and do some handling there:

May be before the LOADPACKAGE procedure in the code:

function TForm1.RunDLLForm(aName: ShortString; aControl: TWinControl): Boolean;
var
  aPackageRegItem: TPackageRegItem;
  iFound: Integer;
begin
  Result := False;

  aPackageRegItem  := PackageRegister.Find(aName);
  if not (aPackageRegItem.AccessLevel = lNone) then
  begin
    libHandle := LoadPackage(aPackageRegItem.Filename); //ERROR HERR..
  end;

Also is it possible that the units that are not compiled with this project BUT are contained in the  same folder causing this to happen?

Thanks for the input.
PS: I am raising points to 250.
0
 
LVL 3

Expert Comment

by:KyleyHarris
ID: 11897784
I am not certain, but generally the packages that will be looked for are the packages in your list of runtime packages. in Options|Packages| compile with runtime dlls. It will look in the exe location, and then the windows path to find those packages.

In your sample you are calling LoadPackage yourself. This will raise an error if the application has already loaded the package, or if you already have something compiled into your app which also exists in the compiled app. (not counting any normal crashing av's)

This may be hard for anyone to track down for you because of the nature of the problem
0
 

Author Comment

by:pro2003
ID: 11902357
It was the units in the project folder that were not getting compiled and the project code itself that was pointing to rtl60.bpl. I resaved the project and took out all the old units and added only the ones that were required. It worked.

Thanks for all the help.
0
 
LVL 3

Accepted Solution

by:
KyleyHarris earned 250 total points
ID: 11907570
From my first post ;)
>if you are porting an app it is not going to replace rtl60.bpl with rtl70.bpl in your list. you need to change all the used packages yourself

I am glad you finally got it working. I've been there myself.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 83
Delphi XE10 Round Image 2 77
URL for downloading Google Chrome for Win XP 2 121
Installshield for Embarcadero EX 10.1 Berlin 4 20
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now