Procedure Entry Point invalid in JVCL (jclsysinfo) - delphi

I've installed latest Jedi VCL for Delphi (JVCL 3.49) using install.bat (from jcl and jvcl folders respectively), without errors. The problem is when I run Delphi 2010, I get a lot of errors about invalid entry point in jvcl bpls.
entry point invalid #jclsysinfo#jclcheckwinversion$qqrri in JvCore140.pbl
I get this error in all Jv*.bpl files, and always with the same entry point.
I've checked I don't have old jcl/jvcl files or jv*.bpl/jc*.bpl files. I don't know how to fix this problem. Any sugestion?

When compiling packages in Delphi (as the JCL and JVCL do) that require other packages at compiletime the compiler uses the dcp files for the required packages and not the bpl files of those packages.
For example the JvCore.dpk has Jcl and JclVcl in its required clause among some RTL packages. That means when compiling it will take Jcl.dcp and JclVcl.dcp to get the information where the procedures/classes it needs are located in the bpl.
These dcp files are most of the time (unless specified differently - see next paragraph) located in the DCP folder which is right next to the BPL folder.
If the dcp it uses is not compatible to the bpl it finds when loading you will get those errors. Make sure you don't have any old bpl and dcp files anywhere that the compiler may find. In the JCL setup you can specify where it puts those while the JVCL setup puts them into the same directory as the dcu files.
Additionally if you have different Delphi versions installed it can get worse because usually the dcp files don't have a suffix. If the directory it puts those happens to be in the PATH variable wrong versions might be found. However the DCP directory is not put into PATH by the Delphi installation but only the BPL directory.

(While I've been writing this, Stefan Glienke has posted an answer which has a lot more useful info in it, but I'll post it anyway because it's easy to test if you're only interested in one Delphi version)
I'm not sure the following will work for you because I don't have D2010
installed to test it against. You could check it out quite quickly by
trying it using only one .Dpk file in step 4.
Note that I always set the Output paths for BPL,
DCP and DCU files to a Lib2 folder under the Delphi version's install folder.
That way I know where they all are so it's easier to tidy up if something goes
wrong.
I uninstalled the JCL and JVCL and deleted all the JV*.BPL, .DCP and
.DCU files
I ran the JCL install .bat, and ignored all the prompts to add folders to
the system PATH, because my Lib2 folder is already on the PATH.
In the folder for my Delphi version below JVCL\Packages, I edited all the
.Dpk files to use my Lib2 folder for the BPL, DCP and DCU output files. this is
a bit tedious but only needs to be done once and can be made easier by doing it
using a keyboard macro.
Then, using the IDE package tool, compiled and installed all the JVCL .Dpk
files that have "Design" in their names and that I want to install.
They all installed without ther error message you are getting.

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.

Delphi BPL search path

Every BPL-related question found by me in Internet refers to some BPL already shipped with Delphi or at least installed globally, into Delphi folders.
I would like to make my own application to find a run-time BPL file made by me, without saving global paths anywhere, without registering my package in Delphi globally. Only put BPL file into "packages" subdirectory, define search path and compile.
Project Options
Delphi Compiler
Search path: I defined relative path to my BPLs (packages folder) here
Packages
Runtime Packages
Link with runtime packages = True
Runtime packages: defined my BPL's name here, without extension
The problem is that compiler can't find my package although I have added the packages subdirectory to Project Options.
How to make it find my package?
The compiler doesn't need your BPL file. It needs the corresponding DCP file, as well as the DCU files for the units you use. Make sure those files' directories are on your search path, and your project should compile fine.

How to use dxRibbon component? Help me

I have used dxRibbon component.
But while compiling it raises the error
file not found dxribboncustomizationform.dcu
What should I do???
Go to a Cmd prompt at your top level DexExpress folder.
Do a
Dir dxribboncustomizationform.dcu /S
Depending on your set-up you may find the .Dcu file in more than one folder
below
DevExpress VCL /Library
Add whichever folder contains the most recent version of the .Dcu file to your project's Library path, preferably ahead of the existing Devex ones (some folders may be labelled for 64-bit & you should ignore those if your project is 32-bit, of course).
If the Dir step doesn't find the .Dcu, your best bet is to uninstall the Devex libraries and re-install them from scratch.

Installing Indy - which folders should be added to Delphi's Library list?

The directions on how to install Indy10 are (at least to me) a little vague in one place, and I'm hoping someone here can clarify a little.
The installation directions (From http://www.indyproject.org/sockets/Docs/Indy10Installation.en.aspx) state:
After Compiling
In your Indy directory you should now see some compiled .dcu files.
Open the IDE and go to the "Tools > Environment options > Select
Library" dialog tab. Now add the path to your files into the filepath
collection. Click Ok.
My Indy10 folder does not have any .dcu files in the root folder. It does have a bunch of DCU files in C:\code\Indy10\Output\DCU\Win32\Debug ... does this mean I should be adding C:\code\Indy10\Output\DCU\Win32\Debug to my library path? (And for that matter, should I be building Indy in Debug or Release mode, or does it matter?) Are there any other subfolders I need to add to the library path? Indy 10 has a much more complex folder structure than Indy 9 and I'm not convinced I've configured things "correctly".
Nearly every component package I install I touch the project options for the runtime package(s) to get a clean install.
Project Options
General Configuration
Output directory {componentpath}\lib\XE4\$(platform)\$(config)
Release Configuration
Output directory {componentpath}\lib\XE4\$(platform)
After that I compile the whole package for all target platforms in release and debug mode. Using a Build-Group is very useful to do that.
Now it is time to add the library paths (for each platform)
Library path {componentpath}\lib\XE4\$(platform)
Debug DCU path {componentpath}\lib\XE4\$(platform)\debug
Browse path all directories containing the source
In your own projects you can control which .dcu versions are used by setting the Use Debug-DCU option.

How not to compile installed packages everytime anew with the Application that uses it?

When I install a package in the IDE and use it in a project, it gets recompiled (DCUs are replaced) everytime I compile my project.
I can't imagine that this is intended - the RTL and VCL are not compiled each time either, are they?
I have played a bit with the paths in Tools > Options > Environment Options > Delphi Options > Library, but without success.
I have found a construction allowing compilation of my project without recompiling the package having DCUs and PASs in diffenent paths, but in this construction Delphi is not able to locate the sources at all from the Code Editor (SHIFT-clicking for example), so this is not an option.
To avoid recompilation you have to have separate folders for .dcu files and .pas files.
Usually this is done by settings the output dir in a package contained in the library. You build the package and it will produce the .dcu files in a output folder that is different from the source folder.
To use the package you then:
have to point the library path to the output folder (with the compiled .dcu files).
can optionally point the search path to the source folder (with the .pas files).
This gets a little more complicated when you have .dfm files in the package as well.
Every .pas file that the compiler sees in the library path is recompiled. (Actually only the last instance, because you can have the same unit in different directories that are listed in the library path).
To enable IDE features like CTRL-click you have to set the {$Y+} compiler switch in your package which can be done in the IDE Compiling options:
http://docwiki.embarcadero.com/RADStudio/XE4/en/Compiling#Debugging_Options

Resources