GraphicEx with Delphi 10.1 Berlin - delphi

I installed GraphicEx (a Delphi image loader library) in Delphi 7, and it worked fine.
Now, when I try to install it in Delphi 10.1 Berlin, I get errors:
[dcc32 Error] JPG.pas(1136): E2065 Unsatisfied forward or external declaration: 'jpeg_reset_huff_decode'
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '#jfwrite'
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '#jfflush'
[dcc32 Error] JPG.pas(1258): E2065 Unsatisfied forward or external declaration: '#jfread'
[dcc32 Fatal Error] GraphicEx.pas(613): F2063 Could not compile used unit 'JPG.pas'
So, how can I use GraphicEx in Delphi 10.1 Berlin?

As described on the page to which you link, this library has not been updated to the latest versions of Delphi. However, you will most likely find that you do not need it any more. Recent Delphi versions have out of the box support for JPEG and PNG images formats.
Resolve your problem by removing references to this library and using the built in image format support.
If you are using the library for the more esoteric image formats that it offers then you will need to update it to work with the your version of Delphi.
In the first instance, the compilation errors that you report are simply down to your not having added the necessary folders to your search path. The object files that define those functions are found in the 3rd party\LibJPG\obj folder. You must add that to your search path. When you do that you will get another error. Keep resolving them one by one.

Related

Error message linking a C++ Builder 10.1 Berlin project

[ilink32 Error] Error: Unresolved external '__fastcall System::Variant::Exec(System::AutoCmd&, int) const' referenced from
I am getting the above error message when I am trying to use the new 32-bit compiler in C++ Builder 10.1 Berlin instead of the classic compiler.
This same piece of code compiles successfully using the classic compiler.
I know something is probably missing (a lib?), but what?
Any idea?

XE6 - XSLProd unit missing

I've just did a migration from XE3 to XE6.
Now I'm stuck with compile error [dcc32 Fatal Error] e.pas(6): F1026 File not found: 'XSLProd.dcu'. On XE3 this unit is under the path Embarcadero\RAD Studio\10.0\source\internet.
But under the same folder on XE6 there is no unit named like that.
I've search the whole folder for XslProd.pas file and the result was 0.
Does anybody know what happend to this unit - I guess there is a chance that this unit was removed some version prior to XE6.
This unit was removed in XE5. The classes that it contained are not to be found in any other unit in the source folder so one can only conclude that, either:
Embarcadero decided to remove the unit from the product for some reason, or
The unit was somehow removed by accident.
My guess is that the former is the case, that the unit was removed intentionally. And that the reason for doing so related to the development of the new mobile platforms.

Intermittent Spurious Delphi E2200 and E2213 occurring together when building packages : how to fix?

Error E2200 is to be expected if you try to put the same unit X into two different named packages, Y and Z. It is NOT expected when the name of the package is the same on both the left and the right side of the error message. It is also odd that the above spurious or confusing E2200 is most often accompanied by E2213, bad packaged unit format.
I see intermittent compiler errors in this form, which was clearly intended to warn users that they are putting the same unit into two different packages, yet it sometimes occurs that it gives you this message with the same package basename on the left and on the right, in the case below, note the Jacob-Two-Two error message. You can't put that in ZZLibD16, because it's already in ZZLibD16. This error is confusing to users, including me, and yet I've seen this many times, and already worked out how to get around it.
[DCC Error] ZZLibD16.dpk(82): E2200 Package 'ZZLibD16' already contains unit 'ZZChartComboBox'
[DCC Error] ZZLibD16.dpk(83): E2200 Package 'ZZLibD16' already contains unit 'ZZComboBox'
[DCC Error] ZZLibD16.dpk(84): E2200 Package 'ZZLibD16' already contains unit 'ZZDBComboBox'
[DCC Error] ZZLibD16.dpk(85): E2200 Package 'ZZLibD16' already contains unit 'ZZDBGrid'
[DCC Error] ZZLibD16.dpk(86): E2200 Package 'ZZLibD16' already contains unit 'ZZQuery'
[DCC Error] ZZLibD16.dpk(87): E2200 Package 'ZZLibD16' already contains unit 'ZZTable'
[DCC Error] ZZLibD16.dpk(88): E2200 Package 'ZZLibD16' already contains unit 'ZZTrackBar'
[DCC Fatal Error] RSLibD16.dpk(308): E2213 Bad packaged unit format: ZZSomething.dcp.ZZUnitX - Expected version: 23.0, Windows Unicode(x86) Found version: 0.0, Unk(x86)
I believe that the normal cause of this strange "You can't put X in Y" where error is some "bad package hygiene" practice, and I have suspicions about what the fixes are, but I wonder if anyone has researched this and can definitively answer what one should do.
I normally try to resolve it by looking for duplicate copies of DCP files and cleaning up the duplicate or extra copies. I am aware of that part of this question. What I'm wondering is, is there something you can do to avoid the IDE breaking your computer and generating bad DCUs? For example, I have long suspected that by avoiding having packages and projects have any paths common to their input (search) and output (DCU output and DCP output) paths, one can avoid this problem. Is that the case? If not, what is the way to prevent such problems? What organizational rules in your project search and library search paths will avoid this problem?
In some cases the following is enough: Right click on every project in your group and clean. Now build again, problem goes away, for a while, only to return. In other cases, I have more complex sets of packages to build, and the only workable workaround is NOT to build from the IDE at all, but rather to build from msbuild from a batch file. In yet other cases, I find it helps to change all packages from "Rebuild as needed" to "Explicit rebuild". I am in fact, not able to understand or really "solve" or prevent the problem, and only able to work around it by various kludges. Has anyone got a better understanding, who can explain the cause and solution of such package strange problems, including the "bad packaged unit format"?
In the question above, I am specifically using Delphi XE2, but I think that a similar answer should be applicable for all versions of Delphi from about 2010 and up.
Go to "C:\Users\Public\Documents\Embarcadero\Studio", Rename folder "21.0" to "21.0_" and restart Delphi and Give a Try

Delphi TeeChart - print preview and save dialog

I'm using the built in TeeChart in Delphi XE for graphs.
When I just put a graph on a form, I have all these options to export/save or print preview, but those aren't there at runtime.
I want to add a button for a save dialog and a print preview (right now I just have it doing Chart1.Print and Chart1.SaveToBitmapFile)
I googled around and I found this link: http://www.steema.com/support/faq/NewVCL/FAQ_VCL_DIALOGS.htm
So I added EditChar to Uses and added the line
EditChart(Self,Chart1 );
but when I try to compile, it gives me errors:
[DCC Error] E1026 File not found: 'TeeBackImage.DFM'
[DCC Error] E1026 File not found: 'TeeEmbossEditor.DFM'
[DCC Error] E1026 File not found: 'TeeMargins.DFM'
[DCC Error] E1026 File not found: 'TeeMouseCursor.DFM'
[DCC Error] E1026 File not found: 'TeeStringsEditor.DFM'
Also I've added Uses TeePrevi, but it says ChartPreview is an undeclared identifier
Does anyone know what's going on? Creating a chart and printing/saving works fine, and the errors seem to happen when I add Uses EditChar
Thanks
I am using Delphi XE2 with TeeChart Standard (as included with XE2)
I added "VCLTee.TeeEdiGene, VCLTee.EditChar" to the uses list and then I added the lines:
ChartPreview(Self,Chart1);
and
EditChart(Self,Chart1 );
to my code to bring up the preview and edit dialogs. It seems to work OK
Run-time chart editor, print preview & exporting dialogs are not available in TeeChart VCL Standard, which is the version shipped in Delphi, and therefore necessary units are not included. To be able to do so you'll need TeeChart Professional VCL. Here you'll find the TeeChart landing page for RAD Studio users with a grid comparing Std and Pro versions, access to the fully functional Pro evaluation version, etc.

compiling delphi-pi

After Downloading the source, tried to compile the code.
The first bump was missing Jedi components, so downloaded jcl-2.2.1.3817-partnerdvd
Next step was installing , which was fine.
Now After Compiling , the error message is :
[DCC Fatal Error] Utils.pas(4): F2051
Unit JclCompilerUtils was compiled
with a different version of
JclSysUtils.IJclCommandLineTool
tried to download diffrenct versions, however the owner of the code claim it was compiled with 2.2.
Ideas how to resolve this?
edit: i just removed some references to the jedi from the library path, i hope didn't do any damage. still no go.
EDIT 2: downloaded the 0.57 and not the default resulted in:
[DCC Fatal Error] Utils.pas(4): F1026
File not found: 'JclBorlandTools.dcu'
now it seems as a simple version problem with jcl, ill reinstall(again).
Most Delphi error and warning messages are pretty clear, but "Compiled with a different version" errors are one of the few exceptions. What it really means is:
Something in Unit JclSysUtils (or one of its dependencies) has changed, and Unit JclCompilerUtils, which has a dependency on JclSysUtils, needs to be recompiled now, but only the DCU for it is available. Unable to locate the PAS file to recompile it.
Try making sure that the original source code for all the JCL units is available to the compiler.
I have checked my settings. I have compiled latest revision of delphipi using JCL 2.2.1.3886.
My library path contains following paths:
C:\Users\Public\Documents\Soft Gems\Virtual Treeview\Source
C:\Components\jcl-2.2.1.3886\lib\d14
C:\Components\jcl-2.2.1.3886\source\include
Delphipi depends three external libraries which are JCL, dxgettext and Virtual Treeview and links to these libraries are listed in the homepage of the project. I think you should check double check your JCL installation and library paths. Sorry, there is nothing else I can do about this. Good luck.

Resources