RTL150.BPL not found - delphi

i have this problem: i compile and run application and all work in mine computer. When i try to run same application in other computer, i have error about rtl150.bpl not found.
I have searched on internet and all response that i have had tell me to verify if in PROJECT->OPTION->PACKAGES is checked: "BUILD WITH RUNTIME PACKAGE".
It is checked, i compile project but i have same every error. I have saw too that executable of application is very small for example: 186 KB, when usually it was about 2000 KB.
I use delphi xe and not know as i need to do for solve it.
Please, someone can help me to solve this problem?
Thanks very much.

If you build with packages you must distribute the packages (.BPL files) your application uses.
If you don't build with runtime packages you won't get this error.
The list of packages you must distribute is semi-colon delimited list next to the check box for Build with run time packages in the project options.
The Size of an Executable will drop when building with Runtime packages. That is because the code is now in the BPL/Package. But that means your application now needs these additional files. Think of a Package as a specialized DLL that has been renamed.

Related

I get a Can't load package error although the BPL is there

This issue is driving me crazy. I'm trying to compile and install The QR Designer from QuickReports 6. I have an issue just with the one package. When I right the package in the IDE > Install the IDE gives me:
Can't load package C:\xe10_3\QRDesign\Win32\Debug\dclqrd_DXE10_3.bpl.
The specified module could not be found.
But the exact file is there.
I've also tried installing it via the menu under Components > Install Packages and then choosing the BPL from there, with the same issue.
I've tried to use Process Monitor as on this post here to find the issue:
Delphi Can't load package the specified module cannot be found
I couldn't fix the issue, but what I did pick up from Process Monitor was that some process was looking for the package here:
Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\21.0\Package Cache\dclqrd_DXE10_3.bpl
That key didn't exists. I tried manually creating the key, but that didn't do a thing.
Any ideas?
UPDATE
Here is the list of packages:
As you can see, dclqrd_DXE10_3 is dependant on two others. Which I already built and installed. I removed its references and re-added them again now, to make sure the references are sound. I guess its like Remy said, the Specified module not found is probably not referring to dclqrd_DXE10_3 although I don't know what other module it could be referring to.
To install a package successfully in IDE, follow the steps:
Open the dpk/dproj/groupproj file in IDE
Build the package(s) for Windows 32-bit platform.
IDE itself is a 32-bit applicaton, so it should match.
Normally, it will build all dependent/required packages
Check if all chain of BPL & DCP files are generated in package Output directory.
It defaults to $(BDSCOMMONDIR)\Bpl & Dcp folders, but can be changed individually for each Package in Settings.
PBL packages are like DLL files. In order to load them, it requires all dependent BPLs.
If you have custom package output paths:
Check if your DCP output path is included in Tools\Options\Language\Delphi\Library Library Path for Windows 32-bit platform
Check if no duplicates of outdated compiled packages in default $(BDSCOMMONDIR)\Bpl & Dcp directories
Add the paths to library source pas files in Tools\Options\Language\Delphi\Library Browsing path or Library path
In some specific cases, if the package requires some extra dll-s like DB Client libraries, check if these dlls are 32-bit and are loadable, like included in %path% environement variable.
Note, some libraries offers package installer tools, that automagically do all mentioned things for you.
Also, there are universal package installer tools for quick working environement setup in one click.
I don't know why this fixed my issue, but it did.
The output directories for the bpl and dcp was set to be $(Platform)\$(Config)
The project files for the different packages exists in the same folder so the above config was supposed to be the debug folder or the release folder. Why only this package was thrown off I still don't know, but since changing the above packages to have a fixed path suddenly I could now install dclqrd_DXE10_3.bpl.
Thank you all for helping.

Debugging a package during component installation

I need to build old components made for BCB6 (Borland C++ Builder 6) in Embarcadero RAD Studio XE5. Projects are CPP- projects, and the component code is contained in the *.PAS - files.
The project contain 6 packages:
three packages a design time
three packages runtime
First I build packages runtime. After that I start building and installing the packages design time that use packages runtime. And one design time package has a problem during installation:
I found a runtime package that causes this problem. My question is how do I find and resolve the following error? After all, when the package is installed, I cannot start the debugger, see the stack trace, nothing at all. What are the options? Thanks.
For that you need to run a second instance of the IDE in the debugger:
Uninstall the packages
Compile all packages with debug information
Load the project of the runtime package that causes the problem
In Run -> Parameters Set the Host application to $(BDS)\Bin\bds.exe
Press run with debug
This will start a second instance of the IDE. You might have to ignore some exceptions that it internally raises (and handles).
In that second instance, load the design time package which loads the runtime package that causes the problem
Hopefully you will now see what happens

Delphi 7 Exe is not working in Non-delphi machine

Recently i got a chance to work on delphi 7. I just created a sample application which display a welcome message and that exe is working fine on Delphi machine. if i moved that exe to non-delphi machine(where delphi is not installed), it is throwing error as "The program can't start beause rtl70.bpl is missing from your computer. Try reinstalling the program to fix the problem".
if i follow the same process with Delphi 5, it is working fine.
You have built the program to rely on runtime packages. That means that each machine that needs to run the program needs to have the runtime packages available.
There are two solutions:
Distribute the runtime packages that you use alongside the executable.
Disable runtime packages and so build an executable that contains the runtime.
The runtime packages options are determined by settings specified in the project options.
Unless you have some compelling reason to use runtime packages, the second option is much simpler because it allows the executable file to stand alone, with no external dependencies.

Default Library Path

Prior to my problem, I attempted to install a component which required me to change my Library - Win32 library path. The installation did not work out so I left it. A few days ago, I ran Delphi to work on my project. I compiled the program but Delphi told me "Unit not found: 'Systems.pas' or binary equivalents (.dcu) so I changed the Library path to: C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\lib. I was then able to compile my program but when I clicked a button, none of the code ran!
I went back to check my syntax and everything was correct hence why I was able to compile my program (note: my code and program was left untouched for weeks). I then tried to re-install Delphi (2 times) expecting that the Library Path would fix, but it didn't.
After the failed attempts of trying to restore default settings I did some researched on stackoverflow but I could still not find the answer. Topics I've come across:
Delphi XE : Lost Library path
Delphi can't find System.dcu; what should the default path settings be?
I added the ShowMessage function to test if it worked and it did so I really have no clue what the problem is. However I am still suspecting that my Library Path is incorrect.
What do you guys think the problem could be?
my code
or my IDE library path
Note: current library path = C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\lib
Also, how can I fix this problem?
I guess the linked answer should solve you problem. If you need specific data for Delphi 2010, here is the registry file for 64-bit Windows (for 32-bit Windows the registry branch should be [HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\7.0\Library]):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\CodeGear\BDS\7.0\Library]
"Browsing Path"="$(BDS)\\SOURCE\\WIN32\\VCL;$(BDS)\\source\\Win32\\rtl\\common;$(BDS)\\SOURCE\\WIN32\\RTL\\SYS;$(BDS)\\source\\Win32\\rtl\\win;$(BDS)\\SOURCE\\WIN32\\WEBSNAP;$(BDS)\\source\\ToolsAPI;$(BDS)\\SOURCE\\WIN32\\IBX;$(BDS)\\source\\Win32\\Internet;$(BDS)\\SOURCE\\WIN32\\PROPERTY EDITORS;$(BDS)\\source\\Win32\\soap;$(BDS)\\SOURCE\\WIN32\\XML;$(BDS)\\source\\Win32\\db;$(BDS)\\source\\Indy\\Indy10\\Core;$(BDS)\\source\\Indy\\Indy10\\System;$(BDS)\\source\\Indy\\Indy10\\Protocols;$(BDS)\\source\\database;"
"Debug DCU Path"="$(BDS)\\lib\\Debug;$(BDS)\\Lib\\Debug\\Indy10;$(BDS)\\RaveReports\\Lib"
"Language Library Path"="$(BDS)\\lib\\$(LANGDIR);(BDS)\\lib\\$(LANGDIR)\\Indy10"
"Package DCP Output"="$(BDSCOMMONDIR)\\Dcp"
"Package DPL Output"="$(BDSCOMMONDIR)\\Bpl"
"Package Search Path"="$(BDSCOMMONDIR)\\Bpl"
"Translated Debug Library Path"="$(BDS)\\lib\\$(LANGDIR)\\Debug"
"Translated Library Path"="$(BDS)\\lib\\$(LANGDIR)"
"Translated Resource Path"="$(BDS)\\lib\\$(LANGDIR)"
"Search Path"="$(BDS)\\lib;$(BDSUSERDIR)\\Imports;$(BDS)\\Imports;$(BDS)\\Lib\\Indy10;$(BDSCOMMONDIR)\\Dcp;$(BDS)\\include;$(BDS)\\RaveReports\\Lib"
If plain import of the above registry file does not help:
Reboot and try again;
If the problem persists, delete
Software\CodeGear\BDS\7.0 branches from both
HKEY_CURRENT_USER\ and HKEY_LOCAL_MACHINE\ hives and reinstall
Delphi;
Never run automatic installation procedure for unknown
component packages on your working system.

Delphi Project Needing runtime Packages, even with runtime Packages off

My Delphi7 project will not run on my clients computer if i don't have a few of the runtime packages in the path. eg rtl70.bpl
I have Build with runtime packages unticked, so shouldn't they be complied into the exe?
Edit: the Project uses Jedi Packages (TJvPlugin) and running the program with out any plugin installed works fine. As Soon as i add a Plugin, the bpl not found errors reappear. Seems like ill have to live with the extra packages.
It has been a while, but it seems like there was something where you needed to (1) check build with runtime packages, and then that enables some other editor (maybe list of packages to use), and you (2) make a change there. (3) Then do a full build, and then (4) remove the runtime packages check and do another (5) full build. It is important to do a full build each time.
From memory:
1. check the build with runtime packages
2. Remove all the run time packages from the list
3. Full build
4. Uncheck the build with run time packages
5. Full build.
Can't test, don't have D7 anymore...
Your project may use DLLs or COM objects that have been built with Delphi packages.
You also need to uncheck the "Use Dynamic RTL" on the Linker tab of the Project Options.
Caveat: I'm using C++Builder, but I believe the options are the same.
One may find this obvious, but check the size of the executable once you've compiled, if it's larger, it'll run. When we manually copy in our updates a smaller dll is a big red flag that something is wrong with the project options.

Resources