#1 2020-08-24 21:08:49

leus
Member
Registered: 2012-09-05
Posts: 79

SynSQLite3Static: E2065 CodecGetReadKey

Using Delphi Tokyo, Win32, trying to include SynSQLite3Static in my project but I'm getting the following errors:

[dcc32 Error] SynSQLite3Static.pas(787): E2065 Unsatisfied forward or external declaration: 'CodecGetReadKey'
[dcc32 Error] SynSQLite3Static.pas(788): E2065 Unsatisfied forward or external declaration: 'CodecGetWriteKey'
[dcc32 Error] SynSQLite3Static.pas(1026): E2065 Unsatisfied forward or external declaration: 'sqlite3_key'
[dcc32 Error] SynSQLite3Static.pas(1027): E2065 Unsatisfied forward or external declaration: 'sqlite3_rekey'
[dcc32 Error] SynSQLite3Static.pas(1036): E2065 Unsatisfied forward or external declaration: 'sqlite3_create_window_function'
[dcc32 Error] SynSQLite3Static.pas(1130): E2065 Unsatisfied forward or external declaration: 'sqlite3_serialize'
[dcc32 Error] SynSQLite3Static.pas(1132): E2065 Unsatisfied forward or external declaration: 'sqlite3_deserialize'
[dcc32 Error] SynSQLite3Static.pas(1138): E2065 Unsatisfied forward or external declaration: 'sqlite3_trace_v2'
[dcc32 Error] SynSQLite3Static.pas(1287): E2065 Unsatisfied forward or external declaration: 'sqlite3CodecAttach'
[dcc32 Error] SynSQLite3Static.pas(1287): E2065 Unsatisfied forward or external declaration: 'sqlite3CodecGetKey'
[dcc32 Error] SynSQLite3Static.pas(1287): E2065 Unsatisfied forward or external declaration: 'sqlite3_activate_see'
[dcc32 Fatal Error] BoletasLocalStorage.pas(13): F2063 Could not compile used unit 'SynSQLite3Static.pas'

My local mORMot directory is a fresh git clone from Github, and all paths are already in the search path. According to the documentation, "referring to SynSQLite3Static.pas in the uses clause of your project is enough to link the .obj/.o engine into your executable."

Do I need to add anything else to my project?

Offline

#2 2020-08-25 06:40:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: SynSQLite3Static: E2065 CodecGetReadKey

The file in github seems correct:
https://github.com/synopse/mORMot/blob/ … qlite3.obj

Your project doesn't link the expected SQLite3.obj file.
Ensure your project has the *mormot*\SQLite3\ path folder properly set in the Library path - not only the Search path.

Check the documentation https://synopse.info/files/html/Synopse … l#TITL_113

26.3.3. Setup the Delphi IDE
To let your IDE know about mORMot source code, add the following paths to your Delphi IDE (in Tools/Environment/Library or Tools/Options/Language/Delphi Options/Library menu depending on your Delphi version):

Library path:
(...existing path...);D:\Dev\mORMot;D:\Dev\mORMot\SQLite3;D:\Dev\mORMot\SynDBDataset
Search path:
(...existing path...);D:\Dev\mORMot;D:\Dev\mORMot\SQLite3;D:\Dev\mORMot\SynDBDataset

Offline

#3 2020-08-25 16:48:51

leus
Member
Registered: 2012-09-05
Posts: 79

Re: SynSQLite3Static: E2065 CodecGetReadKey

Found the issue - somewhere in my existing library path, there is a sqlite3.obj that is way old. I don't want to disturb my old old old AnyDAC libraries so I changed the {$L} directive in SynSQLite3Static.pas around line 340, but I'll have to keep an eye on it in the future.

  {$ifdef MSWINDOWS}
    {$ifdef CPU64}
      {$L sqlite3.o}  // compiled with C++ Builder 10.3 Community Edition bcc64
    {$else}
      {$L D:\delphi\mORMot\static\sqlite3.obj}  // compiled with free Borland C++ Compiler 5.5
    {$endif}

Offline

#4 2020-08-25 16:59:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: SynSQLite3Static: E2065 CodecGetReadKey

The .obj file is not in D:\delphi\mORMot\static\ but in D:\delphi\mORMot\SQLite3.

You may just try

...
{$else}
 {$L .\sqlite3.obj}  // compiled with free Borland C++ Compiler 5.5
{$endif}

Offline

#5 2020-08-25 20:07:31

leus
Member
Registered: 2012-09-05
Posts: 79

Re: SynSQLite3Static: E2065 CodecGetReadKey

Ok, I had deleted that one in my quest to find the wrong file. In any case, I'll make sure the file remains there.

Using '.\sqlite3.obj' does not work, but thanks for the suggestion.

Offline

Board footer

Powered by FluxBB