[yunqa.de] Re: Errors compiling demos with Delphi 4

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 09 Mar 2011 19:14:18 +0100

On 09.03.2011 16:47, Tom Holden wrote:

> Installed DISQLite3 and that went OK except for Install IDE 
> Components. Delphi Install ran without error, thought I had to 
> Compile also and that did not; but once Repository path changed, I 
> see the Yunqa tab and 3 DISQLite components under it.

I, too, suffer from Delphi 4 IDE component installation instabilities,
especially with components which use WideStrings a lot, like DISQLite3 does.

> Some basic DISQLite3 demos compile okay: Create_Table, Show_Table, 
> Backup, RichEdit, World (although the resulting form exceeds the 
> window and keyboard does not work),

I can not reproduce this as you describe it. However, TClientDataSet is
very unstable with Delphi 4 and I suggest not to use it.

> Changes, Execute_SQL, Performance_Test, Prepare_SQL, Profile, 
> Get_Table, StringGrid, StringList, VirtualTable_StringList, 
> Bind_Params, Bind_Params_Names, Blob_and_streams, Busy_Timeout, 
> Creat_Function, Image_Bitmap, Integrity_Check, Log_Inserts, 
> Master_Detail_Query, Math_Expr_Eval, Select_with_Bind.
> 
> Some error messages from those that do not compile:

At the time of this writing, DISQLite3 supports 11 Delphi compiler
versions. I try hard to make the demos compile on as many Delphi
versions as possible, but it is far too demanding to constantly test
all demos with all Delphi versions.

Please understand that the demos are just examples of how to use
DISQLite3, they do not make up the library itself. Some projects
therefore resort to functionality missing from earlier Delphi versions.
The DISQLite3 library itself, however, is fully usable with Delphi 4.

> [Fatal Error] DISQLite3_ClientDataSet_Grid_Form_Main.pas(23): File 
> not found: 'Provider.dcu'  (this is common to a few demos)

This seems to me that you use Delphi 4 Standard Edition. Provider.dcu
is shipped with Delphi Professional, Client/Server, or Enterprise only.
(Disclaimer: Don't take my word on the exact edition, check the feature
chart first.)

> [Error] DISQLite3_Create_Collation_2.dpr(37): Undeclared identifier:
>  'Utf8String'

Please add "DISystemCompat" as the first unit to the uses section. If
you are unsure about how to do this exactly, please take a look at, for
example, DISQLite3_Create_Collation.dpr.

> [Fatal Error] DISQLite3_Drive_Catalog_Form_Main.pas(33): File not 
> found: 'Types.dcu'

Types.dcu was introduced in Delphi 6 only. In addition to that, the
DISQLite3_Drive_Catalog demo uses other functionality not available in
earlier Delphi versions.

> [Error] DISQLite3_Extension_Half.dpr(49): Undeclared identifier: 
> 'PPAnsiChar' (common to a couple of demos)

Just like above, add "DISystemCompat" as the first unit to the uses section.

> [Fatal Error] DISQLite3ZLib.pas(31): File not found: 'ZLib.dcu'

zlib.dcu or zlib.pas are not yet available in Delphi 4.

> [Fatal Error] DISQLite3_Buffered_Grid_Form_Main.pas(35): File not 
> found: 'VirtualTrees.dcu'  (I see that I need to download and
> install something from VirtualTreeView

Correct. Please follow the advice in the comment at the top of
DISQLite3_Buffered_Grid_Form_Main.pas.

> which gives the clue that Provider.dcu, Types.dcu and Zlib.dcu are 
> either an add-on or from a later version of Delphi)

These units are not related to VirtualTreeView.

> Incremental_Blob demo: compiled but app froze requiring forced 
> shutdown.

This is a Delphi 4 IDE issue. The application runs fine if you start it
outside of Delphi, for example by double-clicking on the application's
executable file name in the Windows explorer.

> Hope these are all simple problems and don't presage fundamental 
> limits with Delphi 4 (yes, its 13 yrs old!).

I am sorry to repeat myself, but I must stress that all problems you
listed do not affect the DISQLite3 library itself but the demos only.
They are by no means fundamental and DISQLite3 does work well with Delphi 4.

You can get nearly all demos to compile with Delphi 4 if you apply the
little changes listed above. They will of course be readily included in
the next version of DISQLite3.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: