#1 2011-04-20 13:17:05

corchi72
Member
Registered: 2010-12-10
Posts: 232

an error occurs if I use class SQLite3, ecc in my component

I created a unit called "FileTables" that uses classes and SQLite3 SynCommons but when compiling I get errors "can not find the file SQLite3.pas"even though I entered the path in the Delphi library.

Using the same unit from a project the error does not occur.
What should I add to the component you do not need to add to a project?

unit FileTables;

interface

uses
  Windows,
  SysUtils,
  SynCommons,
  SQLite3,
  SQLite3Commons,
  SQLite3HttpClient,SQLite3HttpServer;

...

Offline

#2 2011-04-20 15:15:23

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

Re: an error occurs if I use class SQLite3, ecc in my component

I suppose you didn't enter the SQLite3 sub-path.

For instance, I had both folders of my computer as this  D:\Dev\Lib;D:\Dev\Lib\SQLite3
in the main Delphi library paths, for both source code and library.

Offline

#3 2011-04-21 07:42:39

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: an error occurs if I use class SQLite3, ecc in my component

odd because I created a variable called "$ (Synops) " with the path of the source of "Synops OpenSource" and in fact if I create a simple project it works.
The component is very simple and is what I set out below.

$(Synopse) = c:\.....\Synopse OpenSource


$(sqlite3obj); where i put sqlite3.obj and sqlite3fts3.obj
$(Synopse);
$(Synopse)\SQLite3;

package SQliteComponent;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$IMPLICITBUILD ON}
{$DEFINE USETMSPACK}

requires
  rtl;

contains
  SQLite3UI in '..\Synopse OpenSource\SQLite3\SQLite3UI.pas';

end.

//is a simple package that uses your unit

unit SQLite3UI;
....
procedure Register;
begin
  RegisterComponents('Synopse',[TSynLabeledEdit]);
end;

Error: impossible to find file "C:\......\SQLite3i18n.pas"
Why

Offline

#4 2011-04-21 10:26:32

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

Re: an error occurs if I use class SQLite3, ecc in my component

AFAIK the "contains" keyword expects relative paths to the package source file.

So it depends where your package source file is.

Offline

#5 2011-04-21 12:37:13

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: an error occurs if I use class SQLite3, ecc in my component

I do not understand, AFAIK is a directive compiler?
I found only these two lines of comments that refer to AFAIK

1) // - it's still fast, faster than any DB AFAIK, around 500 updates
...
2){ Below we just ignore the value of next string token.
       
          We can do this -- because PasDoc (at least for now)
          does not recursively parse units on "uses" clause.
          So we are not interested in the value of
          given string (which should be a file-name (usually relative,
          but absolute is also allowed AFAIK) with given unit.)

Offline

#6 2011-04-21 15:03:52

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

Re: an error occurs if I use class SQLite3, ecc in my component

AFAIK = As Far As I Know
smile

Offline

Board footer

Powered by FluxBB